Nginx restart fails during LEMP setup, help?

  • Posted September 22, 2014

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.


Hey there @nilblank, please could we have a look at the full default config file that you have? Thanks!

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

@aled.skyrail @valley_webuzo

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.

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