nginx-proxy-manager
nginx-proxy-manager copied to clipboard
Django Static files serving
Hello Dear friends
I used to use nginx with the following settings in the nginx.conf file to serve the Django sites
upstream fars_habitat {
server fars_habitat:9000;
}
client_max_body_size 50M;
server {
listen 80;
server_name zistboom.farhangi-fars.com www.zistboom.farhangi-fars.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/errorr.log;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
proxy_pass http://fars_habitat;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real_IP $remote_addr;
}
location /static/ {
alias /fars_habitat/static/;
}
location /files/ {
alias /fars_habitat/;
}
}
And the site was working well
But yesterday I migrated to NginxProxyManager
But in static files, get 404 error
I applied the following settings
Apparently, the locations section is not set correctly
It is possible to guide me to apply the following settings
location /static/ {
alias /fars_habitat/static/;
}
location /files/ {
alias /fars_habitat/;
}
in NginxProxyManager ؟
🤔
any solution?
Issue is now considered stale. If you want to keep it open, please comment :+1: