Question
ERR_CONNECTION_REFUSED [nginx,gunicorn]
Hi DO community!
I know this question has been asked before many times but do believe I have followed everystep mentioned in answers but nothing works.
My website was running very well except when I found out that Multiple image uploads gives 413 request entity too large error and for the sake of solving it I just did the mistake of putting “clientmaxbody_size 100M;” in nginx.conf. From that time till now my website is not getting open and I am getting:
This site can’t be reached
[mydomain] refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERRCONNECTIONREFUSED
I removed the line and restart nginx multiple times but same thing is continuing.
I followed this: https://www.digitalocean.com/community/questions/help-me-to-fix-err_connection_refused
and many others to solve the error but nothing happens.
I have checked out error logs , there is nothing exceptional in them and even now they are not updating to show some new error. I have checked nginx syntax , gunicorn status. Everything is up and fine.
Only one thing that I found weird after running this command sudo journalctl -u nginx:
failed to read pid from file /run/nginx.pid
So I decided to remove this error and followed https://www.digitalocean.com/community/questions/unable-to-start-nginx-failed-to-read-pid-from-file-run-nginx-pid
But still nothing is working out. Do help me out as my running website has just stopped that is causing alot of issue to me.
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.
×
am also experiencing similar issue, am using angular as the front head and I placed the file in var/www/html/mypolicyfrontend, I av the same setting in gunicorn and Nginx as mahawaqar . though in my case i have my DRF installed in a user /home/jacob. i av scouted the net for 6 days now with no hope.. kindly assist .. i cant get pas my login (though on development everything is ok) regards