By jeremydagorn
Hi, I am trying to follow this tutorial https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
I can run python myapp.py, it starts correctly on port 5000. When trying to access it to check everything works by going to serverip:5000, I got an internal server error. Where are the errors logged? How can I debug it? I don’t want to proceed to the next step until it is fixed.
Thanks! Jeremy
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!
Before running the uwsgi ini file you will need to add a line to it to create logs.
Something like:
#location of log files
logto = /var/log/uwsgi/%n.log
Then you will have to create the directory in your VPS (not that you can create the directory in whatever path you want, as long as it’s the path that you have in the ini file):
sudo mkdir -p /var/log/uwsgi
sudo chown -R user:user /var/log/uwsgi
If you want to see the logs you can cat command them in the terminal.
Nginx error logs default location is:
/var/log/nginx/error.log
As for debugging (correctly) that is a skill beyond my current abilities!
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.