mirror of
https://github.com/Alexander-D-Karpov/photodock.git
synced 2026-03-16 22:06:35 +03:00
60 lines
1.3 KiB
Nginx Configuration File
60 lines
1.3 KiB
Nginx Configuration File
upstream photodock {
|
|
server app:8080;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
location /thumb/ {
|
|
alias /data/cache/;
|
|
|
|
proxy_pass http://photodock;
|
|
proxy_cache_valid 200 365d;
|
|
proxy_cache_use_stale error timeout updating;
|
|
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /original/ {
|
|
internal;
|
|
alias /data/photos/;
|
|
}
|
|
|
|
location /placeholder/ {
|
|
proxy_pass http://photodock;
|
|
proxy_cache_valid 200 365d;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /static/ {
|
|
proxy_pass http://photodock;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /internal/cache/ {
|
|
internal;
|
|
alias /data/cache/;
|
|
}
|
|
|
|
location /internal/photos/ {
|
|
internal;
|
|
alias /data/photos/;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://photodock;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
} |