Report this

What is the reason for this report?

refused to connect

Posted on July 17, 2019

Hi I’m unable to connect to 127.0.0.1:8000.

I get the error:127.0.0.1 refused to connect.

My details are these:

user www-data; worker_processes 4;

 events {
     worker_connections  1024;

 }

 http {
     include       mime.types;
     default_type  application/octet-stream;
     keepalive_timeout  2;
     sendfile        on;
     #tcp_nopush     on;
     tcp_nodelay     on;
     gzip  on;
     server {
         listen       80;
         server_name  hestque.com www.hestque.com;

         location / {
             uwsgi_pass 127.0.0.1:9001;
             include uwsgi_params;
         }

         location /static {
             root /var/web2py/applications/init/;
         }
     }

HTTPS server

 server {
     listen       443;
     server_name  www.hestque.com hestque.com;
     ssl                  on;
     ssl_certificate      /opt/nginx/conf/server.crt;
     ssl_certificate_key  /opt/nginx/conf/server.key;

     location / {
         uwsgi_pass 127.0.0.1:9001;
         include uwsgi_params;
         uwsgi_param     UWSGI_SCHEME $scheme;
     }

location /static { root /var/web2py/applications/init/; } }

}



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!

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.

Done the change to .8000 checked my firewalls still getting the same error: Firefox can’t establish a connection to the server at 127.0.0.1:8000. Regards

Hello,

As far as I can see port 8000 is not specified anywhere in the config. You have a listen parameter for port 80 and port 443, and you also have a uwsgi_pass for port 9001. What exactly is supposed to be listening on port 8000?

Maybe if you could specify what exactly are you aiming to achieve I could advise you further.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.