Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sendy + PHP7 + nginx: How I got it to work
  • Vote Up0Vote Down mpalokajmpalokaj
    Posts: 6Sendy user

    Hello all,

    Thought I'd post this here for those who are struggling.

    First off, sendy is 100% php7 compatible. However it relies on some modules that are not included by default. You might initially get some 500 errors, or redirects to the logged out page.

    PHP7 modules:

    apt-get install -y php7.0-curl php7.0-xml
    phpenmod curl
    phpenmod xml
    phpenmod xmlreader
    phpenmod simplexml
    service php7.0-fpm restart
    

    Also don't forget your crontab of course.

    Nginx config (this is in a subfolder)

    location /sendy/ {
        try_files $uri $uri/ $uri.php?$args;
    }
    
    
    location /sendy/l/ {
        rewrite ^/sendy/l/([a-zA-Z0-9/]+)$ /sendy/l.php?i=$1 last;
    }
    
    location /sendy/t/ {
        rewrite ^/sendy/t/([a-zA-Z0-9/]+)$ /sendy/t.php?i=$1 last;
    }
    
    location /sendy/w/ {
        rewrite ^/sendy/w/([a-zA-Z0-9/]+)$ /sendy/w.php?i=$1 last;
    }
    
    location /sendy/unsubscribe/ {
        rewrite ^/sendy/unsubscribe/(.*)$ /sendy/unsubscribe.php?i=$1 last;
    }
    
    location /sendy/subscribe/ {
        rewrite ^/sendy/subscribe/(.*)$ /sendy/subscribe.php?i=$1 last;
    }
    
    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
        access_log off;
        log_not_found off;
    }
    
    # Endsendy
    
    
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }
    
This discussion has been closed.
All Discussions