Skip to content

Nginx Rewrite Rules

2»

Comments

  • Sigh I can't get to work any configurations. I keep getting 403 or 502 errors depending on the config I try. I was on Apache for years and everything was ok but with nginx it's not working. I've tried all kind of permissions as well and it seems fine at that level. Please help!!!

  • edited August 2020

    In case it helps, here's my config:
    (note I don't have the "location" stuff in the first few lines, just these lines and it works fine - EXCEPT that my opens are being tracked. still trying to get to the bottom of that one...

    rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
    rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
    rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
    rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
    rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
    
    location ~ "^/([a-zA-Z0-9-]+)$" {
        try_files $uri $uri/ /$1.php$is_args$args;
    }
    
  • Is it still compatible with a new version of Sendy? I would like to install on my subdomain mail.situstarget.com. Now it's still using Apache but I would like to migrate and use nginx

Sign In or Register to comment.