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”’; } }
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.