By joshua593sk8
Hello, I am trying to deploy my flask app and I have followed everything from this tutorial https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-16-04
but when I am on the last step to load my page by the IP address I get a 502
I checked the log and this is what I have connect() to unix:/home/jb/webjosue/my-page/my-page.sock failed (2: No such file or directory) while connecting to upstream
and these are my files
etc/systemd/system/myproject.service
[Unit] Description=Gunicorn instance to serve my-page After=network.target
[Service] User=jb Group=www-data WorkingDirectory=/home/jb/webjosue/my-page Environment=“PATH=/home/jb/webjosue/FlaskENV/bin” ExecStart=/home/jb/webjosue/FlaskENV/bin/gunicorn --workers 3 --bind unix:/home/jb/webjosue/my-page/my-page.sock -m 007 wsgi:app
[Install] WantedBy=multi-user.target
server { listen 80; server_name (ip address here);
location / {
include proxy_params;
proxy_pass http://unix:/home/jb/webjosue/my-page/my-page.sock;
}
}
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!
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.