Question

connection refused

This is the configuration file of nginx but I get connection refused error

server { charset UTF-8; listen 80; server_name my ip; root /var/www/language/videosapp; access_log /var/log/videosapp/nginx/access.log; error_log /var/log/videosapp/nginx/error.log; client_max_body_size 50M;

location /static { alias /var/www/videosapp/static; } location /media { alias /var/www/videosapp/media; } location /{ proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_read_timeout 300; uwsgi_read_timeout 3600; proxy_connect_timeout 300; proxy_pass http://127.0.0.1:8000; proxy_set_header X-Forwarder-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P ‘CP=“ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV”’; } }

Subscribe
Share

Submit an 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.

Hi @chefvillas,

Can you check one of the following

First, please make sure Nginx is actually listening on port 80

netstat -tulpen | grep port 80

Once you have confirmed that, I’ve noticed you are using proxy pass with port 8000. Is anything listening to that port 8000?

Additionally, I’ll recommend checking your Nginx error log. It should display the error and the reason behind the error.

Regards, KDSys