Nginx restart fails during LEMP setup, help?

September 22, 2014 1.6k 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
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.

Have another answer? Share your knowledge.