Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
Quick Reverse Proxy Question...
« previous
next »
Print
Pages: [
1
]
Author
Topic: Quick Reverse Proxy Question... (Read 2461 times)
Hoe
Newbie
Posts: 14
Karma: 0
Quick Reverse Proxy Question...
«
on:
March 19, 2021, 12:44:37 am »
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
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Quick Reverse Proxy Question...
«
Reply #1 on:
March 19, 2021, 12:39:27 pm »
Have you tried a location block like:
Code:
[Select]
location / {
proxy_pass http://PIHOLE_IP/admin/;
}
Logged
Hoe
Newbie
Posts: 14
Karma: 0
Re: Quick Reverse Proxy Question...
«
Reply #2 on:
March 20, 2021, 09:22:42 pm »
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.
Thanks
«
Last Edit: March 20, 2021, 09:24:47 pm by Hoe
»
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Quick Reverse Proxy Question...
«
Reply #3 on:
March 20, 2021, 09:38:38 pm »
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
Logged
fabian
Moderator
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: Quick Reverse Proxy Question...
«
Reply #4 on:
March 20, 2021, 10:18:10 pm »
proxy_pass is done via the upsteram servers. Did you
regenerate the config
and restart after changing the parameters?
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
Quick Reverse Proxy Question...