InvenTree/docker/nginx.conf

37 lines
895 B
Nginx Configuration File
Raw Normal View History

2021-04-10 12:25:07 +00:00
server {
2021-04-18 05:17:57 +00:00
# Listen for connection on (internal) port 80
2021-04-10 12:25:07 +00:00
listen 80;
location / {
# Change 'inventree-server' to the name of the inventree server container,
2021-04-18 08:53:30 +00:00
# and '8000' to the INVENTREE_WEB_PORT (if not default)
proxy_pass http://inventree-server:8000;
2021-04-18 08:53:30 +00:00
2021-04-10 12:25:07 +00:00
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
2021-05-06 12:46:32 +00:00
2021-04-10 12:25:07 +00:00
proxy_redirect off;
2021-05-06 12:46:32 +00:00
2021-04-10 12:25:07 +00:00
client_max_body_size 100M;
2021-04-18 08:53:30 +00:00
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
2021-05-06 12:46:32 +00:00
2021-04-18 08:53:30 +00:00
proxy_buffering off;
proxy_request_buffering off;
2021-05-06 12:46:32 +00:00
2021-04-10 12:25:07 +00:00
}
2021-04-18 05:17:57 +00:00
# Redirect any requests for static files
2021-04-10 12:25:07 +00:00
location /static/ {
2021-04-18 05:17:57 +00:00
alias /var/www/static/;
2021-04-18 08:53:30 +00:00
autoindex on;
# Caching settings
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
2021-04-10 12:25:07 +00:00
}
}