I was trying to set up my website when i got a message saying
“System update required” when i ssh into my cPanel.
So i used ‘sudo system reboot’
Since then, i get the “Site can’t be reached” problem. Ever since then when a friend tried to connect to the server he got an Error 503 message.
I understand that the 503 message means that the server doesn’t have enough CPU or memory to handle traffic. But i don’t have any traffic coming to my website at all. Its just a fresh website. Nothing there.
i checked my error logs in /var/log/nginx/ and got these messages:
2017/11/19 22:34:13 [emerg] 1384#1384: “server” directive is not allowed here in /etc/nginx/sites-enabled/default:52
2017/11/19 22:34:13 [emerg] 1396#1396: “server” directive is not allowed here in /etc/nginx/sites-enabled/default:52
2017/11/19 22:34:13 [emerg] 2087#2087: “server” directive is not allowed here in /etc/nginx/sites-enabled/default:52
2017/11/19 22:34:13 [emerg] 1380#1380: “server” directive is not allowed here in /etc/nginx/sites-enabled/default:52
2017/11/19 22:34:13 [emerg] 1375#1375: “server” directive is not allowed here in /etc/nginx/sites-enabled/default:52
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sorry to see that your question hasn’t received an answer yet. An nginx “directive is not allowed here” error means that you have a syntax error in one of your nginx configuration files. In this case, it’s /etc/nginx/sites-enabled/default. Make sure you don’t have any misplaced semicolons, or nested server blocks. You can also post the file’s content here and we’ll take a look. Whenever you make a change to a config file, you can test it for syntax errors by running sudo nginx -t.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.