Websites are not working when Nginx is enabled

Created:

2016-12-27 23:50:07 UTC

Modified:

2017-08-08 13:46:24 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Websites are not working when Nginx is enabled

Issue Symptoms

  1. When Nginx is disabled, websites are working.

  2. Nginx does not listen on any port:

    # netstat -ntpl | grep nginx
    
  3. There is a commented line in /etc/nginx/nginx.conf:

    # grep '/etc/nginx/conf.d/' /etc/nginx/nginx.conf
     # include /etc/nginx/conf.d/*.conf;
    

Conditions

Incorrect Nginx configuration.

Resolution

  1. Edit /etc/nginx/nginx.conf and uncomment include /etc/nginx/conf.d/*.conf;.

  2. Restart Nginx:

    # service nginx restart
    
Have more questions? Submit a request
Please sign in to leave a comment.