this post was submitted on 29 Sep 2024
37 points (95.1% liked)

Selfhosted

40337 readers
467 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hi folks,

Just set up Nginx Proxy Manager + Pihole and a new domain with Porkbun. All is working and I have all my services service.mydomain.com, however some services such as pihole seem to be strictly reachable with /admin at the end. This means with my current setup it only directs me to pihole.mydomain.com which leads to a 403 Forbidden.

This is what I have tried, but with no prevail. Not really getting the hang of this so would really appriciate a pinpoint on this :)

you are viewing a single comment's thread
view the rest of the comments
[–] sk@hub.utsukta.org 3 points 1 month ago (5 children)

@Sunny' 🌻 that must not happen, did you remove the custom location from before? The above is working with my pihole setup

[–] Sunny 3 points 1 month ago (4 children)

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 points 1 month ago (2 children)

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?

[–] Sunny 2 points 1 month ago (1 children)

Remove any custom locations (if u have tried to add any), and then simply copy paste this into the advanced tab. Dont forget to change the <IP+PORT>

location / {
    return 301 /admin;
}
location /admin {
    proxy_pass http://<YOUR IP:PORT>/admin;
    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;
}

Let me know how it goes :)

[–] TedZanzibar@feddit.uk 2 points 1 month ago

Yeah that's exactly what I'd done but it was insisting on trying to redirect me to the site on port 4443 for some reason.

Fixed it in the end by reverting the NPM config to default (no advanced settings) and instead using Pihole's VIRTUAL_HOST=pihole.mydomain.internal environment variable in the Docker compose file.

Cheers for your help anyway!

load more comments (1 replies)
load more comments (1 replies)