# Can't access /admin (another webpage running there already)

**URL:** <https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853>\
**Category:** Help\
**Created:** [April 13, 2018, 6:32pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853 "2018-04-13T18:32:07Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 6:32pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/1 "2018-04-13T18:32:08Z")

</div>

Hi Folks,

I've just installed Pi-Hole on my NAS/Server.  
However, I have my own (local) webpage that I use to manage my content.  
This webpage is also using the [IP]/admin page and for some reason is being favoured instead of pihole.

## Expected Behaviour:

Going to "[IP]/admin" shows the admin page of pihole.

## Actual Behaviour:

It shows my own (local) webpage.

## Debug Token:

I'd rather not at this point, unless specifically required.

* * *

The local content management webpage is actually made by a friend of mine and I don't want to alter it (since I want to stay compatible to his project).

A valid solution would be:  
192.168.2.10/admin (content management admin page)  
192.168.2.10/pihole/admin (pihole admin page)

Or simply

192.168.2.10/admin (content management admin page)  
192.168.2.10:1234/admin (pihole admin page)

I'm running NGINX as a webserver.  
I'm thinking pihole should be under /srv/http/pihole and /etc/nginx/sites-available should have a configuration file for pihole on another port.

However, I'm not quite sure how I would go about this manually, the setup script seems to set up a lot of other things and I don't even know where the root of pihole is set. (or why it's not in the /srv/http folder

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 7:03pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/2 "2018-04-13T19:03:17Z")

</div>

If your NAS allows installing Docker as an addon/app/plugin, you can have Pi-hole running in a docker container with I believe its own IP address:

[https://hub.docker.com/r/diginc/pi-hole/](https://hub.docker.com/r/diginc/pi-hole/)

> [@Paul-v](#):
>
> I’m running NGINX as a webserver.

Do mind that Pi-hole also comes with lighttpd as web service on the same port nginx is using for not only serving the admin page but also show an empty frame/page to replace ads on http sites when the ads get redirected via Pi-hole's DNS.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 7:21pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/3 "2018-04-13T19:21:26Z")

</div>

> [@deHakkelaar](#):
>
> with I believe its own IP address

I believe I am mistaken.  
Another solution is offered on that link:

> If you have no other services or dockers using port 53/80 (if you do, keep reading below for a reverse proxy example)

---

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 7:35pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/4 "2018-04-13T19:35:17Z")

</div>

Hmm, so actually the chances are (very likely) that lighttpd is interfering (or going to) with my NGINX? Would it make sense to pursue the possibility to install PiHole on NGINX?

Nevertheless, my "NAS" is actually merely an Ubuntu Server installation with NFS shares and NGINX (also thinking of installing UniFi Manager, Node-RED and maybe Teamspeak Server).

The reason I'm not running Docker/VM is since it's a baseline HP server (AMD Opteron X3216 with 8GB RAM) and I think it may use too much resources to split it over multiple instances.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 8:04pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/5 "2018-04-13T20:04:26Z")

</div>

> [@Paul-v](#):
>
> Hmm, so actually the chances are (very likely) that lighttpd is interfering (or going to) with my NGINX?

Yes.

If its Ubuntu, you can assign a second IP to the box using IP aliasing and bind daemons/services so you have lighttpd and nginx running alongside each other listening on same ports but on different IP's.  
Checkout this posting for pointers:

> [@Run pi-hole on an additional ip](https://discourse.pi-hole.net/t/run-pi-hole-on-an-additional-ip/3690/9):
>
> I was not able to assign a static IP to an aliased interface using the dhcpcd5 way. So i devised below making use of the default "source-directory /etc/network/interfaces.d" directive in the interfaces file. This is just prove of concept/an example as I dont have ipv6 configured at home. This test Pi only got WiFi so thats why the wlan0:0 (with ip 10.0.0.200). Create new file: sudo nano /etc/pihole/pihole-if Containing below aliased interface with second IP: auto wlan0:0 iface wlan0:0 in…

EDIT: Or if the box got another interface, hook up that one and bind daemons accordingly.

---

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 8:31pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/6 "2018-04-13T20:31:50Z")

</div>

Thank you very much for your input.  
Your info made me aware of how pi-hole is set up.

For now I've changed the lighttpd port to 8899, so I shouldn't interfere with NGINX and I can simply access it through 192.168.2.10:8899/admin.

May I ever make a public website, it also helps that people can't access my pi-hole configuration (: (since I only ever would forward the port for NGINX)

I think this is a proper solution, let me know if that's not the case.  
I'm sorry since my question could've been: "How to change the port of lighttpd", but at the time of writing I didn't yet know this would be an option.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 8:37pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/7 "2018-04-13T20:37:54Z")

</div>

Mind if you change the lighttpd port to a non default one, ads that are redirected to the box's port 80 will end up being served by nginx resulting in 404 errors.  
Thats why lighttpd is configured to reply on 404 errors with its own PHP code to show blank frame/page or a block page when a blacklisted domain is addressed directly in the browser.  
Your missing out on that functionality now.

EDIT:

```
pi@noads:~ $ cat /etc/lighttpd/lighttpd.conf
server.document-root = "/var/www/html"
server.error-handler-404 = "pihole/index.php"

```

---

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 8:55pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/8 "2018-04-13T20:55:06Z")

</div>

Ah I see, that's indeed not as neat.  
I think I'll configure a virtual network interface and bind lighttpd to that.

My ISP's supplied router for some reason doesn't want me to set a different DNS (luckily I'm changing ISP in a few months).

So I've set my phone and laptop to pihole DNS, my laptop indeed gives 404-like errors (but that means it works as expected), however, my phone (chrome browser on android) is letting ads through.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 9:01pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/9 "2018-04-13T21:01:51Z")

</div>

You can try see how the blockpage looks like by browsing to below link:

`http://doubleclick.com:8899`

> [@Paul-v](#):
>
> My ISP’s supplied router for some reason doesn’t want me to set a different DNS

Can replace routers DHCP with Pi-hole's one:

> [@How do I use Pi-hole's built in DHCP server (and why would I want to)?](https://discourse.pi-hole.net/t/how-do-i-use-pi-holes-built-in-dhcp-server-and-why-would-i-want-to/3026):
>
> Using Your Existing Router For Network-wide Ad Blocking You might not need to use Pi-hole's DHCP server: In many home environments, your router also functions as your DHCP server. In this case, you can often [set Pi-hole to be the DNS server for your network clients in the router's DHCP (or LAN) settings page](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245), which allows all of your network clients to block ads simply by connecting to the network. Setting it up this way is also what makes Pi-hole very powerful for network-wide ad blocking. W…

---

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 9:18pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/10 "2018-04-13T21:18:29Z")

</div>

> [@deHakkelaar](#):
>
> [http://doubleclick.com:8899](http://doubleclick.com:8899)
> 
> Paul-v:

I get:  
`[ERROR]: Unable to parse results from queryads.php: Unhandled error message ()`

Also, I actually checked, but the ISP's router DHCP server can't even be disabled.. they use a prefab router but actually greyed out the enable/disable button... I can't wait to get a different provider.

Though I must say that it's a neat feature from pi-hole.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 9:22pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/11 "2018-04-13T21:22:41Z")

</div>

Well it should have returned below or similar (no idea why the error):

 ![](https://discourse.pi-hole.net/uploads/default/original/3X/0/1/01d70bd24e9f4d0e311aa289fe6ab7f356e695e4.png)

Ps. search discourse for NGINX!  
I believe there are postings how to configure nginx to host Pi-hole.  
But if a Pi-hole update is applied to the lighttpd config, you understand it wont be pushed to nginx.

---

<div class="post-metadata">

**Author:** ![Paul-v](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ecccb3/32.png) [@Paul-v](https://discourse.pi-hole.net/u/Paul-v)\
**Post date:** [April 13, 2018, 9:39pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/12 "2018-04-13T21:39:17Z")

</div>

I've just configured lighttpd to use port 80  
And NGINX to use port 8888

This actually works fine for my purpose, also the error dissapeared and I now get a user-friendly blockpage.

Running them on different virtual interfaces (or just get a pi) should do the trick.

Also after restarting my phone, it now works on my phone as well.

Thank you very much!  
I'll have a look at virtual interfaces and binding them on lighttpd and NGINX, so far it has been very interesting/informative.

Now I reside to leaving bad reviews on my provider (':

Thank you for your help once again, your support is much better as that of my provider. (I could only do those things when changing to a business connection and the person actually told me he didn't know how/what settings would be required for using my own router. Mind I actually pay them a monthly subscription...)

I'll make a paypal donation, if that helps/fits you.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [April 13, 2018, 9:46pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/13 "2018-04-13T21:46:30Z")

</div>

Love it 🙂  
One final remark, lighttpd has "mod\_proxy" if its just plain http an not https that you'r hosting on nginx.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [May 4, 2018, 9:46pm UTC](https://discourse.pi-hole.net/t/cant-access-admin-another-webpage-running-there-already/8853/14 "2018-05-04T21:46:34Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
