Compare commits
No commits in common. "bf61829ba6ec9fb4a562f1f1e5539824319a748b" and "071e52a0d8b8bb75c4699430df6a027f7062878c" have entirely different histories.
bf61829ba6
...
071e52a0d8
@ -13,34 +13,13 @@ server {
|
|||||||
access_log off;
|
access_log off;
|
||||||
error_log /var/log/nginx/nik4naohomearpa_error.log warn;
|
error_log /var/log/nginx/nik4naohomearpa_error.log warn;
|
||||||
|
|
||||||
# ---- Dashy at / (root) ----
|
# ---- Convenience redirects ----
|
||||||
location = / {
|
location = / { return 302 /admin/; } # land on Pi-hole admin by default
|
||||||
proxy_pass http://127.0.0.1:8084;
|
location = /pihole { return 302 /admin/; } # /pihole -> /admin/
|
||||||
include snippets/proxy-common.conf;
|
location /pihole/ { return 301 /admin/; } # keep only /admin/ path
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
location = /pihole {
|
|
||||||
return 302 /admin/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---- favicon (avoid noisy 404 in browser) ----
|
|
||||||
# Put a favicon.ico in /var/www/html if you want a real icon.
|
|
||||||
location = /favicon.ico {
|
|
||||||
root /var/www/html;
|
|
||||||
access_log off;
|
|
||||||
try_files /favicon.ico =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /pihole/ {
|
|
||||||
return 301 /admin/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---- Jellyfin at /jellyfin/ ----
|
# ---- Jellyfin at /jellyfin/ ----
|
||||||
location = /jellyfin {
|
location = /jellyfin { return 302 /jellyfin/; } # enforce trailing slash
|
||||||
return 302 /jellyfin/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /jellyfin/ {
|
location /jellyfin/ {
|
||||||
proxy_pass http://jellyfin_upstream/; # uses upstream (or use the raw URL)
|
proxy_pass http://jellyfin_upstream/; # uses upstream (or use the raw URL)
|
||||||
@ -51,12 +30,13 @@ server {
|
|||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Prefix /jellyfin;
|
proxy_set_header X-Forwarded-Prefix /jellyfin;
|
||||||
|
|
||||||
|
# (Optional) if you see odd redirects, uncomment:
|
||||||
|
# proxy_redirect off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- Jellyfin at /anime/ ----
|
# ---- Jellyfin at /anime/ ----
|
||||||
location = /anime {
|
location = /anime { return 302 /anime/; } # enforce trailing slash
|
||||||
return 302 /anime/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /anime/ {
|
location /anime/ {
|
||||||
proxy_pass http://djellyfin_upstream/; # uses upstream (or use the raw URL)
|
proxy_pass http://djellyfin_upstream/; # uses upstream (or use the raw URL)
|
||||||
@ -68,24 +48,9 @@ server {
|
|||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Prefix /anime;
|
proxy_set_header X-Forwarded-Prefix /anime;
|
||||||
}
|
|
||||||
|
|
||||||
# ---- Pi-hole v6 fix: map /admin/api/* -> /api/* ----
|
# (Optional) if you see odd redirects, uncomment:
|
||||||
location = /admin/api {
|
# proxy_redirect off;
|
||||||
return 301 /api/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ^~ /admin/api/ {
|
|
||||||
proxy_pass http://pihole_upstream/api/;
|
|
||||||
include snippets/proxy-common.conf;
|
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- Pi-hole admin at /admin/ ----
|
# ---- Pi-hole admin at /admin/ ----
|
||||||
@ -93,34 +58,18 @@ server {
|
|||||||
location /admin/ {
|
location /admin/ {
|
||||||
proxy_pass http://pihole_upstream/admin/;
|
proxy_pass http://pihole_upstream/admin/;
|
||||||
include snippets/proxy-common.conf;
|
include snippets/proxy-common.conf;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pi-hole API (some UI calls hit /api/)
|
# Pi-hole API (some UI calls hit /api/)
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://pihole_upstream/api/;
|
proxy_pass http://pihole_upstream/api/;
|
||||||
include snippets/proxy-common.conf;
|
include snippets/proxy-common.conf;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# redirect /watch-party -> /watch-party/
|
# redirect /watch-party -> /watch-party/
|
||||||
location = /watch-party {
|
location = /watch-party { return 302 /watch-party/; }
|
||||||
return 302 /watch-party/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# proxy ONLY /watch-party/*, keeping the prefix
|
# proxy ONLY /watch-party/*, keeping the prefix
|
||||||
location ^~ /watch-party/ {
|
location ^~ /watch-party/ {
|
||||||
@ -136,9 +85,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ---- qBittorrent at /qbt/ ----
|
# ---- qBittorrent at /qbt/ ----
|
||||||
location = /qbt {
|
location = /qbt { return 302 /qbt/; }
|
||||||
return 302 /qbt/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ^~ /qbt/ {
|
location ^~ /qbt/ {
|
||||||
proxy_pass http://qbt_upstream/;
|
proxy_pass http://qbt_upstream/;
|
||||||
@ -156,9 +103,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ---- JDownloader2 at /jd2/ ----
|
# ---- JDownloader2 at /jd2/ ----
|
||||||
location = /jd2 {
|
location = /jd2 { return 302 /jd2/; }
|
||||||
return 302 /jd2/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /jd2/ {
|
location /jd2/ {
|
||||||
proxy_pass http://127.0.0.1:5800/;
|
proxy_pass http://127.0.0.1:5800/;
|
||||||
@ -171,9 +116,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ---- JDownloader-Bridge at /jd-bridge/ ----
|
# ---- JDownloader-Bridge at /jd-bridge/ ----
|
||||||
location = /jd-bridge {
|
location = /jd-bridge { return 302 /jd-bridge/; }
|
||||||
return 302 /jd-bridge/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /jd-bridge/ {
|
location /jd-bridge/ {
|
||||||
proxy_pass http://127.0.0.1:8088/;
|
proxy_pass http://127.0.0.1:8088/;
|
||||||
@ -182,22 +125,4 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Prefix /jd-bridge;
|
proxy_set_header X-Forwarded-Prefix /jd-bridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- Dashy convenience redirects (Dashy is served at /) ----
|
|
||||||
location = /dashy {
|
|
||||||
return 302 /;
|
|
||||||
}
|
|
||||||
location ^~ /dashy/ {
|
|
||||||
return 302 /;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ---- Default: serve Dashy for everything else ----
|
|
||||||
# All more specific locations above (/admin/, /api/, /jellyfin/, etc.) will still win.
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:8084;
|
|
||||||
include snippets/proxy-common.conf;
|
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,9 +64,7 @@ server {
|
|||||||
error_page 500 502 503 504 /errors/50x.html;
|
error_page 500 502 503 504 /errors/50x.html;
|
||||||
|
|
||||||
# (Optional) Block noncompliant AI bots (requires $block_ai map in nginx.conf)
|
# (Optional) Block noncompliant AI bots (requires $block_ai map in nginx.conf)
|
||||||
if ($block_ai) {
|
if ($block_ai) { return 403; }
|
||||||
return 403;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Serve /robots.txt on HTTPS
|
# Serve /robots.txt on HTTPS
|
||||||
location = /robots.txt {
|
location = /robots.txt {
|
||||||
@ -75,9 +73,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Enforce trailing slash for subpath and land / on /watch-party/
|
# Enforce trailing slash for subpath and land / on /watch-party/
|
||||||
location = /watch-party {
|
location = /watch-party { return 301 /watch-party/; }
|
||||||
return 301 /watch-party/;
|
|
||||||
}
|
|
||||||
location = / {
|
location = / {
|
||||||
try_files /nik4nao-xyz-landing.html =404;
|
try_files /nik4nao-xyz-landing.html =404;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user