Question

Error: Site cant be reached. Website refused to connect

  • Posted November 20, 2017
  • Nginx

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

Subscribe
Share

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.

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.