2022-11-09 13:11:32 +02:00
|
|
|
# NOTE: This file is generated on startup. See /start.sh
|
2022-09-14 04:50:10 +02:00
|
|
|
worker_processes auto;
|
|
|
|
error_log /var/log/nginx/error.log;
|
2022-09-14 20:36:29 +02:00
|
|
|
pid /tmp/nginx.pid;
|
2022-02-20 06:42:10 +02:00
|
|
|
|
2022-09-14 04:50:10 +02:00
|
|
|
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
|
|
|
include /usr/share/nginx/modules/*.conf;
|
2022-04-24 04:08:45 +02:00
|
|
|
|
2022-09-14 04:50:10 +02:00
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
2022-04-24 04:08:45 +02:00
|
|
|
|
2022-09-14 04:50:10 +02:00
|
|
|
http {
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
2022-02-20 06:42:10 +02:00
|
|
|
}
|
2022-06-24 05:18:50 +02:00
|
|
|
|
2022-09-14 20:36:29 +02:00
|
|
|
client_body_temp_path /tmp/client_temp;
|
|
|
|
proxy_temp_path /tmp/proxy_temp_path;
|
|
|
|
fastcgi_temp_path /tmp/fastcgi_temp;
|
|
|
|
uwsgi_temp_path /tmp/uwsgi_temp;
|
|
|
|
scgi_temp_path /tmp/scgi_temp;
|
|
|
|
|
2022-09-14 04:50:10 +02:00
|
|
|
# events {
|
|
|
|
# worker_connections 1000;
|
|
|
|
# }
|
2022-06-24 05:18:50 +02:00
|
|
|
|
2022-12-30 04:09:38 +02:00
|
|
|
upstream server {
|
|
|
|
server $IMMICH_SERVER_HOST
|
|
|
|
keepalive 2
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream web {
|
|
|
|
server $IMMICH_WEB_HOST
|
|
|
|
keepalive 2
|
|
|
|
}
|
|
|
|
|
2022-09-14 04:50:10 +02:00
|
|
|
server {
|
|
|
|
|
2022-12-30 04:37:50 +02:00
|
|
|
# Compression
|
2022-09-14 04:50:10 +02:00
|
|
|
gzip on;
|
2022-12-30 04:37:50 +02:00
|
|
|
gzip_comp_level 2;
|
2022-06-30 04:49:35 +02:00
|
|
|
gzip_min_length 1000;
|
2022-12-30 04:37:50 +02:00
|
|
|
gzip_proxied any;
|
|
|
|
gzip_types
|
|
|
|
application/javascript
|
|
|
|
application/json
|
|
|
|
font/truetype
|
|
|
|
image/svg+xml
|
|
|
|
text/css
|
|
|
|
text/html;
|
|
|
|
gzip_vary on;
|
2022-09-14 04:50:10 +02:00
|
|
|
gunzip on;
|
|
|
|
|
|
|
|
client_max_body_size 50000M;
|
|
|
|
|
|
|
|
listen 8080;
|
|
|
|
access_log off;
|
|
|
|
|
|
|
|
location /api {
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
rewrite /api/(.*) /$1 break;
|
|
|
|
|
2022-12-30 04:09:38 +02:00
|
|
|
proxy_pass ${IMMICH_SERVER_SCHEME}server;
|
2022-09-14 04:50:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
|
|
|
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-12-30 04:09:38 +02:00
|
|
|
proxy_pass ${IMMICH_WEB_SCHEME}web;
|
2022-09-14 04:50:10 +02:00
|
|
|
}
|
2022-06-24 05:18:50 +02:00
|
|
|
}
|
2022-11-09 13:11:32 +02:00
|
|
|
}
|