mirror of
https://github.com/immich-app/immich.git
synced 2024-11-24 08:52:28 +02:00
104 lines
2.3 KiB
Nginx Configuration File
104 lines
2.3 KiB
Nginx Configuration File
# NOTE: This file is generated on startup. See /start.sh
|
|
worker_processes auto;
|
|
error_log /var/log/nginx/error.log;
|
|
pid /tmp/nginx.pid;
|
|
|
|
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
|
include /usr/share/nginx/modules/*.conf;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
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;
|
|
|
|
# events {
|
|
# worker_connections 1000;
|
|
# }
|
|
|
|
upstream server {
|
|
server $IMMICH_SERVER_HOST
|
|
keepalive 2
|
|
}
|
|
|
|
upstream web {
|
|
server $IMMICH_WEB_HOST
|
|
keepalive 2
|
|
}
|
|
|
|
server {
|
|
|
|
# Compression
|
|
gzip on;
|
|
gzip_comp_level 2;
|
|
gzip_min_length 1000;
|
|
gzip_proxied any;
|
|
gzip_types
|
|
application/javascript
|
|
application/json
|
|
font/truetype
|
|
image/svg+xml
|
|
text/css
|
|
text/html;
|
|
gzip_vary on;
|
|
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;
|
|
|
|
proxy_pass ${IMMICH_SERVER_SCHEME}server;
|
|
}
|
|
|
|
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;
|
|
|
|
proxy_pass ${IMMICH_WEB_SCHEME}web;
|
|
}
|
|
}
|
|
}
|