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!

In this Discussion

Can't install Sendy on Ubuntu 14.04 + Nginx + MariaDB (all logs attached)
  • Vote Up0Vote Down mcbetzmcbetz
    Posts: 1Sendy user

    I cannot get Sendy getting started on my Ubuntu machine. Despite following the Get started guide and checking all errors from Troubleshooting, I get an nearly white screen when trying to install.

    I downloaded the latest version (v1.1.9.5), extracted it to a folder, set user rights for the whole folder to sudo chmod u+x *, set the rights for folder uploads to 777 and made sure that there are no empty spaces before or after the first line in the config.php file. Also, I double-checked that I did not put in wrong apostrophes in Vim.

    Here is my server configuration and error logs (I changed my URL to server.com):

    What am I doing wrong? Any help is appreciated!

  • 4 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,470Sendy support

    Hi,

    Sendy is not supported on Nginx. It's only supported on Apache as described in the FAQ on Sendy's website http://sendy.co/#faqs-buy.

    Or try using this Nginx configuration file by another Sendy user - https://gist.github.com/refringe/6545132

    Alternatively, I provide setup and installation of LAMP stack and Sendy on Amazon EC2 (http://aws.amazon.com/ec2/) for $79.

    Amazon's 'micro' server with 613MB of RAM cost $0.013/hour ($9.5 per month). If you're a new AWS user, a free tier is available so you can use it free for 1 year. Also, the first 2,000 emails sent via SES each day that are invoked from an EC2 server are free as well.

    Just let me know if you wish to go with this.

    Thanks.

    Best regards,
    Ben

  • Vote Up0Vote Down mcbetzmcbetz
    Posts: 1Sendy user

    Thanks Ben,

    I know that it's not supported by default. That's why the standard FAQs and guidelines did not help. I used the Nginx configuration you're pointed towards, but that obviously was not the problem. Maybe someone else who is using Nginx might find the problem.

    As MariaDB is a dropin replacement to MySQL and the Nginx configuration working for other people, I tend towards thinking it might be either a PHP problem or a file permission problem.

  • Vote Up0Vote Down mcbetzmcbetz
    Posts: 1Sendy user

    Hey Ben,

    would you mind posting my question to "Troubleshooting"? Maybe someone else can help me, I think the community is very helpful.

    Thanks, Martin

  • Vote Up0Vote Down mpalokajmpalokaj
    Posts: 8Sendy user

    I feel your pain. Took me a while. Here goes:

    EDIT: Bloody hell, this markup filter is a pain in the *ss. I can't get the formatting right. Make sure not to miss any lines when copying the code.

    1. Set of your /nginx/sites-available/whateversite file to run as a normal server

    SERVERCODE

    server { listen 80 default_server; listen [::]:80 ipv6only=on; server_name www.domain.com; rewrite ^ https://$server_name$request_uri? permanent; }

    ENDSERVERCODE

    The rewrite line forwards non www to www and is optional

    1. In my case sendy is in a subfolder. Add the following

    Sendy code

        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 ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include /etc/nginx/fastcgi_params;
            fastcgi_param SCRIPT_FILENAME /var/www/YOURDOMAIN.com/html$fastcgi_script_name;
        }
    
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
            access_log off;
            log_not_found off;
            expires 30d;
        }
    

    END SENDY CODE

    1. My mistakes:
    • Set up your cron right, and make sure you have the PHP Cli installed (took me half a day to figure out)
    • Check your nginx error log, it sometimes messes up some fastcgi stuff

    For reference purposes, below is my file as it is. It is built for a https website that runs wordpress in the root and sendy in a subfolder.

    MY FULL FILE

    server { listen 80 default_server; listen [::]:80 ipv6only=on; server_name www.skillcollector.com; rewrite ^ https://$server_name$request_uri? permanent; } server {

    listen              443 ssl;
    server_name         www.skillcollector.com;
    ssl_certificate     /etc/nginx/ssl/skillcollector.com.chained.crt;
    ssl_certificate_key /etc/nginx/ssl/skillcollector.com.key;
    
    root /var/www/skillcollector.com/html;
    index index.php index.html index.htm; 
    
    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }
    
    rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    
    Sendy
    
        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 ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include /etc/nginx/fastcgi_params;
            fastcgi_param SCRIPT_FILENAME /var/www/skillcollector.com/html$fastcgi_script_name;
        }
    
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
            access_log off;
            log_not_found off;
            expires 30d;
        }
    
    Endsendy
    
    
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }
    
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME /var/www/skillcollector.com/html$fastcgi_script_name;
    }
    

    }

    END MY FULL FILE

This discussion has been closed.
All Discussions