Nginx restart fails during LEMP setup, help?

Posted September 22, 2014 4.1k views

Hi all!

When I I try to restart nginx, after editing sudo nano /etc/nginx/sites-available/default, I get this fail response:

Restarting nginx nginx [fail]

Checking the error.log I get this:

2014/09/22 14:50:48 [emerg] 5568#0: invalid variable name in /etc/nginx/sites-enabled/default:56

I assume this means that the issue is line 56 on the “default” file.

If that’s the case, then the issue is supposedly:

fastcgi_split_path_info ^(.+\.php)(/.+)$;

Which, according to this tutorial (, is exactly as it should be.

So what am I doing wrong and how can I fix it?

Thanks in advance.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Please post the complete configuration content. There might be a syntax error in a previous line [line above] - Maybe a missing semi-colon(;)


I actually ended up starting from scratch with a new droplet. This time it worked without too much fiddling. So, I’m up and running.

Thanks for replying! Happy that there is such a responsive community here on DO.