Question

nginx error “page is temporarily unavailable”

I’ve SSH installed a Python 3.5 application on CentOS along with uwsgi and nginx, but after doing a sudo vi /etc/nginx/nginx.conf to edit the nginx config file as per usual, the response is currently:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

these are the contents of the /etc/nginx/nginx.conf file:

sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

include             /etc/nginx/mime.types;
default_type        application/octet-stream;

include /etc/nginx/conf.d/*.conf;

server {
    listen      [::]:80 default_server;
    server_name  _;
    root         /var/www/html/<directory//;

    location / {
    }

The server is currently showing an nginx error page


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@dev5

Uhm, but your Nginx has server_name localhost; which means it’s only accessible from the server itself. Can you post your entire Nginx site configuration and your entire uWSGI? And I would recommend that you do not have any server blocks in your main Nginx configuration located in /etc/nginx/nginx.conf

Hi @dev5

Can you run sudo nginx -t or sudo service nginx configtest to test your configuration. And then post the last 30 lines from the error log also:

tail -30 /var/log/nginx/error.log

/etc/nginx/nginx.conf file: https://jpst.it/11K8f

and ```/etc/init/uwsgi.conf`` config file: https://jpst.it/11K8T