Error installing NGINX on Ubuntu

November 12, 2017 1.6k views
Nginx Ubuntu 16.04

Hello, I'm trying to follow this guide but am running into an error at Step 3. When I type in "systemctl status nginx" I get the following:

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: failed (Result: exit-code) since Sun 2017-11-12 19:33:10 UTC; 1min 29

Any ideas why this may be happening?

1 Answer

Run the following command to test the Nginx config and see if there's anything wrong with it:

sudo nginx -t

You can also view the service logs—they should contain any errors that Nginx outputted when it failed to start:

sudo journalctl -u nginx.service
  • I am having a simalar issue. Here are my error logs:

    nginx.service: Control process exited, code=exited status=1
    Failed to start A high performance web server and a reverse proxy server.
    nginx.service: Unit entered failed state.
    nginx.service: Failed with result 'exit-code'.

    I am trying to install vuejs on an already live production app. See this question

Have another answer? Share your knowledge.