refused to connect

July 17, 2019 143 views
DigitalOcean

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;
servername www.hestque.com hestque.com;
ssl on;
ssl
certificate /opt/nginx/conf/server.crt;
sslcertificatekey /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/;
}
}

}

2 Answers

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

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

Have another answer? Share your knowledge.