this post was submitted on 02 Oct 2023
8 points (83.3% liked)

Selfhosted

40006 readers
622 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
 

Hey all,

I'm relatively new to self hosting. I set up a SearxNG on my local network and then recently set up Pi-Hole. Searx is running in a docker container and Pi-Hole is not. However, after setting up Pi-hole the IP I use to connect to Searx now directs to the default the default placeholder page. So my Pi-hole runs on 192.168.0.19/admin and Searx used to run just on 192.168.0.19. I'm guessing there's a config somewhere that I can change to make both work at once I'm just not sure where. Google was less than helpful (or maybe I'm an idiot lol) so I was hoping someone here may have run into a similar issue.

top 11 comments
sorted by: hot top controversial new old
[–] cestvrai@lemm.ee 5 points 1 year ago (1 children)

You need a reverse proxy to accomplish this. The reverse proxy will have port 80 exposed and points PiHole/Searx containers and their respective ports for the paths you specify.

[–] Grenfur@lemmy.one 2 points 1 year ago (1 children)

Ignore my ignorance here. You're talking about something like Nginx?

[–] cestvrai@lemm.ee 4 points 1 year ago* (last edited 1 year ago) (1 children)

Yes, nginx and caddy are popular reverse proxies.

Without one you can only host applications on different ports, not combined on one port like you want.

[–] Grenfur@lemmy.one 1 points 1 year ago

Got it, thank you kindly :)

[–] x3i@lemmy.x3i.tech 4 points 1 year ago

Tge easiest way is probably to change the port of the Pihole config page

[–] Boring@lemmy.ml 3 points 1 year ago* (last edited 1 year ago) (1 children)

The issue is that pihole has a default on port 80 that can be set up to redirect to /admin. If your running searx on the same ports on the same IP something's gonna break.

You'll need to change one if the applications port number and specify the port in your URL (192.160.0.19:8080) to get there.

A reverse proxy will help only after you set your ports correctly.

[–] Grenfur@lemmy.one 2 points 1 year ago (1 children)

Do you happen to know how I would find what port it's on and where I would change it? My Pi-hole actually defaulted to /admin, and when using my Searx instance I never had to use a port, so I'm not entirely sure where that info would be.

[–] Boring@lemmy.ml 3 points 1 year ago* (last edited 1 year ago) (1 children)

/admin isnt a port it is just a subdirectory of lighttpd, the webpage pihole uses to display itself. If you don't specify a port, your browser defaults to port 80 for http, and 443 on https.

You can use the netstat -a while the webpage is open on your terminal to find what port is in use.

In docker you can find this and change it in the yaml file if you deployed that way, otherwise you may need to kill the container and remake it and choose a different port when specifying the "p" in docker.

If you didn't use docker for pihole you will have to navigate to /etc/lighttpd/lighttpd.conf and modify the port number there.

Edit: if you want to add a reverse proxy to this equation with a an actual domain name and real SSL certs check out this video: https://www.youtube.com/watch?v=qlcVx-k-02E

[–] Grenfur@lemmy.one 2 points 1 year ago

Eyy! That got it! I think I'm still going to set up nginx to make it easier as I add more self hosts so I'm not trying to memorize everything's port. Thank you kindly for your time!

[–] Decronym@lemmy.decronym.xyz 2 points 1 year ago* (last edited 1 year ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
PiHole Network-wide ad-blocker (DNS sinkhole)
SSL Secure Sockets Layer, for transparent encryption
nginx Popular HTTP server

[Thread #182 for this sub, first seen 2nd Oct 2023, 21:05] [FAQ] [Full list] [Contact] [Source code]