This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/docker/nginx.conf

43 lines
896 B
Nginx Configuration File
Raw Normal View History

2020-09-09 18:34:21 +02:00
server {
server_name localhost:8000;
client_max_body_size 10M;
gzip on;
gzip_types
application/javascript
application/x-javascript
application/json
application/rss+xml
application/xml
application/vnd.ms-fontobject
application/font-sfnt
2020-12-26 16:49:47 +01:00
image/svg+xml
image/x-icon
text/xml
text/javascript
2020-09-09 18:34:21 +02:00
text/css
text/plain;
gzip_min_length 256;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_vary on;
location /media/ {
alias /app/media/;
expires 30d;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
2020-11-11 08:38:56 +01:00
proxy_set_header X-Forwarded-Proto https;
2020-09-09 18:34:21 +02:00
proxy_pass http://django:8000;
proxy_redirect off;
}
listen [::]:80;
listen 80;
}