Comment on How do I redirect to a /path with Nginx Proxy Manager?
sk@hub.utsukta.org 1 month ago
Add the following in Advanced tab
replace the IP and port
location / {
return 301 /admin;
}
location /admin {
proxy_pass [url=http://<Pi-hole-IP>:<Pi-hole-Port>/admin;]http://<Pi-hole-IP>:<Pi-hole-Port>/admin;[/url]
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;
}
replace the IP and port
Sunny@slrpnk.net 1 month ago
Thank you for providing this, however when i now browse to
pihole.mydomain.com
it gives me a 404, and the URL is directed topihole.mydomain.com/admin:8118
. E.g. the port is somehow ending up at the end of the url haha.sk@hub.utsukta.org 1 month ago
Sunny@slrpnk.net 1 month ago
Ahhh i got it working now! Thanks a bunch for the help, been trying to get this to work for hours now hehe
TedZanzibar@feddit.uk 1 month ago
Just tried this myself and mine does the same thing but I don’t have anything set in the custom locations tab. What did you do to resolve it?
K3can@lemmy.radio 1 month ago
If you’re going to be playing with custom locations and such, it might be worth using nginx directly instead of through the limitations of NPM.