nginx configuration



  • Here is my nginx configuration for anyone who needs it.

    server {
            listen 80;
            root /srv/pufferpanel;
            index index.php;
    
            server_name <SubDomain>;
    
            client_max_body_size 20m;
            client_body_timeout 120s;
    
            location / {
                try_files /public/router.php =404;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index router.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
            }
    
            location /assets {
                try_files /app/$uri =404;
            }
        }
    
        #server {
        #    listen 443;
        #    root /srv/pufferpanel;
        #    index index.php;
        #
        #    server_name <ServerName>;
        #
        #    ssl on;
        #    ssl_certificate     /etc/nginx/ssl/<server>.crt;
        #    ssl_certificate_key /etc/nginx/ssl/<server>.key;
        #
        #    location / {
        #        try_files /public/router.php =404;
        #        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        #        fastcgi_pass unix:/var/run/php5-fpm.sock;
        #        fastcgi_index router.php;
        #        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #        include /etc/nginx/fastcgi_params;
        #    }
        #
        #    location /assets {
        #        try_files /app/$uri =404;
        #    }
        #}
        
    
    


  • All though it's very noble but this is from the auto deploy script. That script is generated specifically for the node it was setup for.



  • Auto deploy scripts are for scales. There is an install script. I have had alot of trouble with nginx with the installer config and i had to manually edit it for it to work.



  • @SirCoolness I also changed the servername to <SubDomain>



  • I see. but the auto deploy script should work if you dont have any conflicting packages (ahem apache2).


 

5
Online

749
Users

784
Topics

3.4k
Posts