Question

The Site Can't Be Reached

Posted June 16, 2021 194 views
Nginx

Hi,

When I try to connect to my website, it can’t be reached.

When I run sudo service nginx status

I get the following message.

nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-06-16 01:41:38 UTC; 1min 10s ago
Docs: man:nginx(8)
Process: 5586 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jun 16 01:41:38 edmundburke systemd[1]: Starting A high performance web server and a reverse proxy server…
Jun 16 01:41:38 edmundburke nginx[5586]: nginx: [emerg] unknown directive “alais” in /etc/nginx/nginx.conf:66
Jun 16 01:41:38 edmundburke nginx[5586]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 16 01:41:38 edmundburke systemd[1]: nginx.service: Control process exited, code=exited status=1
Jun 16 01:41:38 edmundburke systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 16 01:41:38 edmundburke systemd[1]: Failed to start A high performance web server and a reverse proxy server.

I can’t find anything online to help solve the problem so would really appreciate some help.

Thanks,

Eddie

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.

×
Submit an Answer
1 answer

Hi there @edmundjtburke,

It looks like that you have a typo in the Nginx configuration file on line 66. It should not be alais but alias. You can open the file on line 66 directly with this command and fix the typo:

sudo nano +66 /etc/nginx/nginx.conf

And there change the alais keyword to alias. After that save the file with CTRL+O, hit Enter to confirm and exit with CTRL+X.

Finally run another config test with:

sudo nginx -t

And if you get Syntax OK restart Nginx:

sudo systemctl restart nginx

Hope that this helps.
Regards,
Bobby