Last active
May 25, 2023 17:09
-
-
Save spiritualized/c87fc97148e279b4c59c6fb51c1a7050 to your computer and use it in GitHub Desktop.
Wizarr reverse proxy nginx config for a URL prefix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nginx reverse proxy config for wizarr in docker on a URL prefix | |
# Use docker's DNS | |
resolver 127.0.0.11; | |
# wizarr | |
location /wizarr/ { | |
set $upstream_app wizarr; | |
proxy_pass http://$upstream_app:5690; | |
# Remove /wizarr path to pass to the app | |
rewrite ^/wizarr/?(.*)$ /$1 break; | |
# Redirect location headers | |
proxy_redirect ^ /$upstream_app; | |
proxy_redirect /admin /$upstream_app/admin; | |
proxy_redirect /login /$upstream_app/login; | |
# Sub filters to replace hardcoded paths | |
#proxy_set_header Accept-Encoding ""; | |
sub_filter_once off; | |
sub_filter_types *; | |
sub_filter '/static/' '/$upstream_app/static/'; | |
sub_filter 'href="/"' 'href="/$upstream_app"'; | |
sub_filter 'action="/' 'action="/$upstream_app/'; | |
sub_filter 'hx-post="/' 'hx-post="/$upstream_app/'; | |
sub_filter 'hx-get="/' 'hx-get="/$upstream_app/'; | |
sub_filter '"/scan?plex_url="' '"/$upstream_app/scan?plex_url="'; | |
sub_filter '"/jf-scan?plex_url="' '"/$upstream_app/jf-scan?plex_url="'; | |
sub_filter '"/scan-specific"' '"/$upstream_app/scan-specific"'; | |
sub_filter '"/jf-scan-specific"' '"/$upstream_app/jf-scan-specific"'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment