This forum has moved to a new location and is in read-only mode. Please visit to access the new location.


I have a DigitalOcean droplet running multiple Laravel sites (setup using this guide).

I added the NGINX configuration from the October docs.

This results in something like this:

server {
        listen 80;
        listen [::]:80;

        root /var/www/myoctober;
        index index.php index.html index.htm;


        location / {
                try_files $uri $uri/ /index.php$is_args$args;

        rewrite ^themes/.*/(layouts|pages|partials)/.*.htm /index.php break;
        rewrite ^bootstrap/.* /index.php break;
        rewrite ^config/.* /index.php break;
        rewrite ^vendor/.* /index.php break;
        rewrite ^storage/cms/.* /index.php break;
        rewrite ^storage/logs/.* /index.php break;
        rewrite ^storage/framework/.* /index.php break;
        rewrite ^storage/temp/protected/.* /index.php break;
        rewrite ^storage/app/uploads/protected/.* /index.php break;

        # pass the PHP scripts to FastCGI server listening on
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;

                # php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

But it does't work. I get a 500 error. Any suggestions?

Last updated


I have no experience with DigitalOcean, but perhaps it's php is not supposed to be used with a socket, but listens on port 9000, like it says in the comment


Thanks for the reply. I have no experience with NGINX but I have this PHP configuration working on multiple Laravel sites. I configured NGINX using the DigitalOcean guide so this is kind of their standart configuration. I guess anyone using their guides will have this same problem. Do you have a configuration example for other hostings?

Last updated


@Parsec, what? This is 500 error, not 502, nginx will not give you 500 error if the fastcgi_pass is wrong, how could it? :D

jonagoldman16975, hhvm by default logs 500 errors with explanation in /var/log/hhvm/error.log, but in case of php5 you need some more actions: take a look here and try to find out what the error means exactly.

I would guess something failed with october installation, but can't really tell anything without knowing at what point of code php crashes with 500.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to