2022-02-20 06:42:10 +02:00
|
|
|
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
|
|
|
# events {
|
|
|
|
# worker_connections 1000;
|
|
|
|
# }
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
2022-04-24 04:08:45 +02:00
|
|
|
gzip on;
|
|
|
|
gzip_min_length 1000;
|
|
|
|
gunzip on;
|
|
|
|
|
2022-02-20 06:42:10 +02:00
|
|
|
client_max_body_size 50000M;
|
|
|
|
|
|
|
|
listen 80;
|
2022-03-27 21:58:54 +02:00
|
|
|
access_log off;
|
2022-04-24 04:08:45 +02:00
|
|
|
|
2022-06-24 05:18:50 +02:00
|
|
|
location /api {
|
2022-04-24 04:08:45 +02:00
|
|
|
|
|
|
|
# Compression
|
2022-06-30 04:49:35 +02:00
|
|
|
gzip_static on;
|
|
|
|
gzip_min_length 1000;
|
|
|
|
gzip_comp_level 2;
|
2022-04-24 04:08:45 +02:00
|
|
|
|
2022-02-20 06:42:10 +02:00
|
|
|
proxy_buffering off;
|
|
|
|
proxy_buffer_size 16k;
|
|
|
|
proxy_busy_buffers_size 24k;
|
|
|
|
proxy_buffers 64 4k;
|
|
|
|
proxy_force_ranges on;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
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_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
2022-06-30 04:49:35 +02:00
|
|
|
rewrite /api/(.*) /$1 break;
|
2022-06-24 05:18:50 +02:00
|
|
|
|
2022-06-30 04:49:35 +02:00
|
|
|
proxy_pass http://immich-server:3001;
|
2022-02-20 06:42:10 +02:00
|
|
|
}
|
2022-06-24 05:18:50 +02:00
|
|
|
|
|
|
|
location / {
|
|
|
|
|
|
|
|
# Compression
|
2022-06-30 04:49:35 +02:00
|
|
|
gzip_static on;
|
|
|
|
gzip_min_length 1000;
|
|
|
|
gzip_comp_level 2;
|
2022-06-24 05:18:50 +02:00
|
|
|
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_buffer_size 16k;
|
|
|
|
proxy_busy_buffers_size 24k;
|
|
|
|
proxy_buffers 64 4k;
|
|
|
|
proxy_force_ranges on;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
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_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
|
|
|
proxy_pass http://immich-web:3000;
|
|
|
|
}
|
2022-02-20 06:42:10 +02:00
|
|
|
}
|