django not logging errors to file when running on nginx
I'm running a django app with uwsgi and nginx. I'm trying to have to django log some 500 errors so I can debug an issue but for some reason it is not writing to the file I've specified when I access my app at its domain. The logging works fine when I manually test the app using uwsgi.
here's my nginx.conf
#nginx.conf
upstream django {
# connect to this socket
server unix:/tmp/uwsgi.sock; # for a file socket
#server 127.0.0.1:8001; # for a web port socket
}
server {
listen 80 default_server;
server_name mysite.org
return 301 https://$server_name$request_uri;
}
server {
# the port your site will be served on
#listen 80 default_server;
#listen 8000;
listen 443 ssl;
root /opt/apps/site-env/trust_site;
# the domain name it will serve for
server_name mysite.org
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /opt/apps/site-env/site/media; # your
Django project's media files
}
location /static {
alias /opt/apps/site-env/site/static; # your Django
project's static files
}
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params;
proxy_pass_header X-CSRFToken;
#proxy_set_header X-Forwarded-Proto https;
#proxy_set_header HOST $host;
}
}
help anyone?
/r/django
https://redd.it/6btiwt
I'm running a django app with uwsgi and nginx. I'm trying to have to django log some 500 errors so I can debug an issue but for some reason it is not writing to the file I've specified when I access my app at its domain. The logging works fine when I manually test the app using uwsgi.
here's my nginx.conf
#nginx.conf
upstream django {
# connect to this socket
server unix:/tmp/uwsgi.sock; # for a file socket
#server 127.0.0.1:8001; # for a web port socket
}
server {
listen 80 default_server;
server_name mysite.org
return 301 https://$server_name$request_uri;
}
server {
# the port your site will be served on
#listen 80 default_server;
#listen 8000;
listen 443 ssl;
root /opt/apps/site-env/trust_site;
# the domain name it will serve for
server_name mysite.org
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /opt/apps/site-env/site/media; # your
Django project's media files
}
location /static {
alias /opt/apps/site-env/site/static; # your Django
project's static files
}
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params;
proxy_pass_header X-CSRFToken;
#proxy_set_header X-Forwarded-Proto https;
#proxy_set_header HOST $host;
}
}
help anyone?
/r/django
https://redd.it/6btiwt
reddit
django not logging errors to file when running on nginx • r/django
I'm running a django app with uwsgi and nginx. I'm trying to have to django log some 500 errors so I can debug an issue but for some reason it is...
Docker container with Django 3, gunicorn, python 3, nginx and PosgreSQL 12
https://twitter.com/hajimekurita/status/1262655024414339075
/r/django
https://redd.it/gmzhmh
https://twitter.com/hajimekurita/status/1262655024414339075
/r/django
https://redd.it/gmzhmh
Twitter
HajimeCEO@IT/Marketing=MainTopic(Temp. COVID19)
#Django info1 I made github repository to construct Django 3+gunicorn+#python 3+#nginx+#PosgreSQL 12 with #docker https://t.co/BIEDU2wLth Django is configured to work with PostgreSQL without configuration & U can see admin screen of Django with least effort.…