Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx + Sendy

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by BamaStangGuy, Jan 8, 2015.

Tags:
  1. BamaStangGuy

    BamaStangGuy Active Member

    465
    136
    43
    May 25, 2014
    Ratings:
    +179
    Local Time:
    8:03 AM
    We have started to use Sendy but can not get it to work with Nginx.

    Here is our current setup:
    Code:
    location /sendy {
    try_files $uri $uri/ $uri.php?$args;
    }
    
    location /sendy/unsubscribe/ {
    rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
    }
    
    location /sendy/subscribe/ {
    rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
    }
    
    location /sendy/w/ {
            rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
        }
    
        location /sendy/l/ {
            rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
        }
    
        location /sendy/t/ {
            rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
        }
    
    None of the links work. For example:

    https://www.religiousforums.com/sen...CBRywgt6892D32DBfrqw/R08gCBRywgt6892D32DBfrqw

    404's.

    These rewrites are based off: Nginx configuration file example for Sendy (http://sendy.co/). which is what Sendy.co support links to.

    Any idea what CentminMod is doing differently to make this not work?
     
  2. BamaStangGuy

    BamaStangGuy Active Member

    465
    136
    43
    May 25, 2014
    Ratings:
    +179
    Local Time:
    8:03 AM
  3. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    unrelated to your issues I believe

    for your issue you misconfigured your rewrites, each target destination rewrite is going to web root and not /sendy/* location i.e.

    Code:
    /w.php?i=$1 last;
    should be
    Code:
    /sendy/w.php?i=$1 last;
    FYI, I'm going to be partially out of action due to https://community.centminmod.com/threads/downtime-when-computer-goes-up-in-smoke.2093/
     
  4. BamaStangGuy

    BamaStangGuy Active Member

    465
    136
    43
    May 25, 2014
    Ratings:
    +179
    Local Time:
    8:03 AM
    Still broke with:

    Code:
    location /sendy/ {
    try_files $uri $uri/ $uri.php?$args;
    }
    
    location /sendy/unsubscribe/ {
    rewrite ^/unsubscribe/(.*)$ /sendy/unsubscribe.php?i=$1 last;
    }
    
    location /sendy/subscribe/ {
    rewrite ^/subscribe/(.*)$ /sendy/subscribe.php?i=$1 last;
    }
    
    location /sendy/w/ {
            rewrite ^/w/([a-zA-Z0-9/]+)$ /sendy/w.php?i=$1 last;
        }
    
        location /sendy/l/ {
            rewrite ^/l/([a-zA-Z0-9/]+)$ /sendy/l.php?i=$1 last;
        }
    
        location /sendy/t/ {
            rewrite ^/t/([a-zA-Z0-9/]+)$ /sendy/t.php?i=$1 last;
        }
     
  5. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    missing the very first location context correction

    Code:
    location /sendy/ {
    try_files $uri $uri/ /sendy/$uri.php?$args;
    }
    
     
  6. BamaStangGuy

    BamaStangGuy Active Member

    465
    136
    43
    May 25, 2014
    Ratings:
    +179
    Local Time:
    8:03 AM
    Still 404's.
     
  7. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    Unfortunately, not much time to help troubleshooting with my pc problems and never using Sendy before. @Andy I believe has mentioned he's played with Sendy + Amazon SES so maybe he has tips. Wonder if @Matt or @RoldanLT have played with Sendy before ?
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    9:03 PM
    1.11
    10.2
    Never tried sendy sorry :(
     
  9. Andy

    Andy Active Member

    281
    42
    28
    Aug 6, 2014
    Ratings:
    +49
    Local Time:
    9:03 AM
    @BamaStangGuy I got the same issue trying to get sendy to work on my centminmod box. It doesn't work for the preview url and many other minor links. I followed whatever guide they have on sendy forum to no avail.
    I gave up and just installed sendy on a $5/month DigitalOcean droplet running ubuntu. I use this guide and it works perfectly
    Configuring Sendy and DigitalOcean | Harmony Tech, Inc.
     
    • Like Like x 1
  10. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    Reading through Sendy.co forums at All Discussions - Sendy Forum seems Nginx hasn't actually been tested officially with Sendy according to the Sendy developer(s) so probably like Andy said Apache is the way. Centmin Mod will eventually have Apache 2.4 (event MPM worker) + PHP-FPM integration for such situations like theses. However, it's not something coming soon given my schedule right now.
     
  11. Andy

    Andy Active Member

    281
    42
    28
    Aug 6, 2014
    Ratings:
    +49
    Local Time:
    9:03 AM
  12. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    thanks @Andy

    ouch for some reason the url you linked to is going in an infinite loop in my browser halting everything in my browser heh. Will check it out later
     
  13. Andy

    Andy Active Member

    281
    42
    28
    Aug 6, 2014
    Ratings:
    +49
    Local Time:
    9:03 AM
    Weird.
    Btw, sendy just released a new version 2.0 and it is getting much better.
     
  14. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    9:03 PM
    1.11
    10.2
  15. Andy

    Andy Active Member

    281
    42
    28
    Aug 6, 2014
    Ratings:
    +49
    Local Time:
    9:03 AM
    Just tested the ngx config above and it works.
    Yeah
     
    • Like Like x 1
  16. eva2000

    eva2000 Administrator Staff Member

    29,034
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,783
    Local Time:
    11:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    thanks @Andy for the confirmation :)