Files
argento/docker/nginx/conf.d/photos.thekims.family.conf
2026-04-14 15:46:48 -04:00

45 lines
1.2 KiB
Plaintext

server {
listen 80;
listen [::]:80;
server_name photos.thekims.family;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name photos.thekims.family;
ssl_certificate /etc/letsencrypt/live/photos.thekims.family/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/photos.thekims.family/privkey.pem;
include /etc/nginx/conf.d/security-headers.inc;
# Immich allows large originals and video uploads
client_max_body_size 50G;
proxy_request_buffering off;
set $upstream_immich http://immich_server:2283;
location / {
proxy_pass $upstream_immich;
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;
# Immich uses WebSockets for live upload progress and notifications
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}