Last active
February 4, 2019 20:13
-
-
Save ninapavlich/e26d3c0196f89be7800a5571a55bbee7 to your computer and use it in GitHub Desktop.
Troubleshoot Python/NGINX Deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Check Services | |
# - NGINX | |
sudo nginx -t | |
sudo service nginx status | |
sudo service uwsgi status | |
# 2. Logs for Errors | |
tail /var/log/nginx/access.fifo | |
tail /var/log/nginx/error.fifo | |
tail /var/log/nginx/error.log | |
tail /var/log/app/app.nginx.access.log | |
tail /var/log/app/app.nginx.error.log | |
tail /var/log/app/uwsgi.log | |
tail /var/log/app/django.log | |
# -- Verify log permissions as well | |
# 3. Run Services Manually to Troubleshoot | |
/srv/app/venv/bin/uwsgi --ini /srv/app/src/uwsgi.ini | |
/srv/app/venv/bin/python /srv/app/src/app.py | |
/srv/app/venv/bin/python /srv/app/src/manage.py | |
# 4. Check Networking | |
# -- check what is bound to ports | |
netstat -ntlp | grep LISTEN | |
# -- checking incoming port openness | |
telnet mydomain.com 80 | |
telnet mydomain.com 443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment