By iuser
Hi Everyone! I’m using this to deploy my flask app. However I’m running into a 502 Gateway Error. I have looked at several posts, and I have not found a solution.
I have already added the extra slashes in the .ini file:
proxy_pass http://unix:///home/sammy/myproject/myproject.sock;
and that didn’t work. After checking the error logs, we found that we’re getting a “upstream prematurely closed connection while reading response header from upstream client”. We’re guessing that we need to increase the timeout, but that didn’t work for us.
Any help would be appreciated!
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!
proxy_pass http://unix:///home/sammy/myproject/myproject.sock; most likely is not what you intended here. It includes both a http:// and unix:// protocol and should have one or the other. To use a unix socket file as the upstream source you should update this line to read:
proxy_pass unix:///home/sammy/myproject/myproject.sock;
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.