mirror of
https://github.com/linuxserver/docker-baseimage-selkies.git
synced 2026-03-16 00:02:11 +08:00
114 lines
3.9 KiB
Plaintext
114 lines
3.9 KiB
Plaintext
server {
|
|
#auth_basic "Login";
|
|
#auth_basic_user_file /etc/nginx/.htpasswd;
|
|
listen 3000 default_server;
|
|
listen [::]:3000 default_server;
|
|
location SUBFOLDER {
|
|
alias /usr/share/selkies/web/;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
location /devmode {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_http_version 1.1;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_connect_timeout 3600s;
|
|
proxy_buffering off;
|
|
client_max_body_size 10M;
|
|
proxy_pass http://127.0.0.1:5173;
|
|
}
|
|
location SUBFOLDERwebsocket {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_http_version 1.1;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_connect_timeout 3600s;
|
|
proxy_buffering off;
|
|
client_max_body_size 10M;
|
|
proxy_pass http://127.0.0.1:CWS;
|
|
}
|
|
location SUBFOLDERfiles {
|
|
fancyindex on;
|
|
fancyindex_footer SUBFOLDERnginx/footer.html;
|
|
fancyindex_header SUBFOLDERnginx/header.html;
|
|
alias REPLACE_DOWNLOADS_PATH/;
|
|
if (-f $request_filename) {
|
|
add_header Content-Disposition "attachment";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = SUBFOLDER50x.html {
|
|
root /usr/share/selkies/web/;
|
|
}
|
|
}
|
|
|
|
server {
|
|
#auth_basic "Login";
|
|
#auth_basic_user_file /etc/nginx/.htpasswd;
|
|
listen 3001 ssl;
|
|
listen [::]:3001 ssl;
|
|
ssl_certificate /config/ssl/cert.pem;
|
|
ssl_certificate_key /config/ssl/cert.key;
|
|
location SUBFOLDER {
|
|
alias /usr/share/selkies/web/;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
location /devmode {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_http_version 1.1;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_connect_timeout 3600s;
|
|
proxy_buffering off;
|
|
client_max_body_size 10M;
|
|
proxy_pass http://127.0.0.1:5173;
|
|
}
|
|
location SUBFOLDERwebsocket {
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_http_version 1.1;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_connect_timeout 3600s;
|
|
proxy_buffering off;
|
|
client_max_body_size 10M;
|
|
proxy_pass http://127.0.0.1:CWS;
|
|
}
|
|
location SUBFOLDERfiles {
|
|
fancyindex on;
|
|
fancyindex_footer SUBFOLDERnginx/footer.html;
|
|
fancyindex_header SUBFOLDERnginx/header.html;
|
|
alias REPLACE_DOWNLOADS_PATH/;
|
|
if (-f $request_filename) {
|
|
add_header Content-Disposition "attachment";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = SUBFOLDER50x.html {
|
|
root /usr/share/selkies/web/;
|
|
}
|
|
}
|