Trying to install Comodo SSL cert and get "nginx: [emerg] "server" directive is not allowed here"

April 1, 2016 1.6k views
Ubuntu Networking LEMP

I’ve tried editing both /etc/nginx/sites-enabled and /etc/nginx/nginx.conf to no avail, i get the same error every time!

What’s going wrong here?

I’m on Ubuntu 14.04.

1 Answer

You’ve got a server {...} block in the wrong spot, paste your nginx.conf and relevant files from sites-enabled and I’ll try to help you fix it.

Have another answer? Share your knowledge.

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