bMINI
This commit is contained in:
49
immich-nginx.conf
Normal file
49
immich-nginx.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
upstream immich {
|
||||
server immich_server:2283;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name bee8333.ddns.net;
|
||||
|
||||
client_max_body_size 50000M;
|
||||
|
||||
# Main application - all requests go to Immich
|
||||
location / {
|
||||
proxy_pass http://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;
|
||||
|
||||
# Critical headers for subpath handling
|
||||
proxy_set_header X-Forwarded-Prefix /immich;
|
||||
proxy_set_header X-Script-Name /immich;
|
||||
|
||||
# WebSocket support for real-time features
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# SPA support - handle client-side routing
|
||||
proxy_intercept_errors on;
|
||||
error_page 404 = @fallback;
|
||||
}
|
||||
|
||||
# Fallback for SPA routing
|
||||
location @fallback {
|
||||
proxy_pass http://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;
|
||||
proxy_set_header X-Forwarded-Prefix /immich;
|
||||
proxy_set_header X-Script-Name /immich;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user