Hey guys,
I have NGNIX running a reverse proxy for my Pi-Hole amongst other things but it's a good example, Pi-Hole listens on... /admin
This annoys my OCD lol, and I wanted to know if I can use the URL Rewrite Function to effectively remove the need for the /admin, so instead of needing to use...
https://pi-hole.domain.com/admin
I would only need to use...
https://pi-hole.domain.com/
I know it's silly, pointless and almost an entire waste of time, but I like learning and playing but not really sure where to start with this one.
Thanks
Have you tried a location block like:
location / {
proxy_pass http://PIHOLE_IP/admin/;
}
No but I am not sure how I would do that in the NGINX Config either, there is no proxy pass field per say...
Any idea how I would go about doing that in the OPNsense config I don't have a code block like that. I tried using /admin in Path Prefix which seemed logical but it didn't work.
(https://i.ibb.co/k61vp9S/image-2021-03-20-202018.png)
Thanks
I don't use the nginx plugin myself, but that would have been my guess too
Can you see what is being written in /usr/local/etc/nginx/nginx.conf when that configuration is included in the GUI? That may help to refine what should be in the GUI. Also try a trailing slash in Path Prefix, ie /admin/
The location block that I put above works on my nginx reverse proxy (running on a Linux host) for pi-hole
proxy_pass is done via the upsteram servers. Did you regenerate the config and restart after changing the parameters?