I am trying to serve CSS and other static files on my django app using NGINX server. So I tried to configure it. Here is my /etc/nginx/sites-enabled/mydomain:
server {
listen 80;
server_name redpillers.net;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/limited/REDPILLERS;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/limited/REDPILLERS/redpillers.sock;
}
location /static/ {
alias /home/limited/REDPILLERS/static/;
}
}
But when I restart the service I got an error in the error logs file:
2019/05/22 07:26:44 [emerg] 11589#11589: duplicate location "/static/" in /etc/nginx/sites-enabled/mydomain:15