villafleurie/nginx/villafleurie.conf
2020-01-02 17:13:18 +01:00

29 lines
No EOL
645 B
Text

server {
listen 80;
server_name localhost;
server_tokens off;
access_log /var/log/nginx/example.log;
location /static/ {
autoindex off;
alias /static_files/;
}
location /media/ {
autoindex off;
alias /media/;
}
location / {
try_files $uri $uri/ @villafleurie;
}
location @villafleurie {
proxy_pass http://web:8000;
proxy_pass_request_headers on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
}