# Conflict with other webservices running on Pi (Ports 80 and 443)

**URL:** <https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329>\
**Category:** Help\
**Created:** [March 21, 2017, 1:44pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329 "2017-03-21T13:44:06Z")\
**Posts on this page:** 20\
**Page:** 2

<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, 2017, 8:05pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/22 "2017-04-13T20:05:45Z")

</div>

@Mcat12 , I dont believe bcutter has configured Pi-Hole properly yet.

> [@bcutter](#):
>
> The router (FritzBox) is FIXED TO DEATH to the IP 10.0.0.10:443. Absolutely NO WAY to change it.

@bcutter , what do you mean by that ? Do you mean 10.0.0.10 is already taken by Fritzbox ? Choose another ?

If you still want to run nginx on 10.0.0.10 and Pi-Hole on 10.0.0.20:

`pihole -r`

please choose from the following options:  
Select 'Reconfigure'

Select Upstream DNS Provider:  
Select custom and enter Fritzbox IP.

Select Protocol:  
Disable IPv6.

Do you want to use your current network settings as a static address?  
Select 'No'.

Enter your desired Ipv4 address:  
10.0.0.20

Once the IP bit is working, you can troubleshoot DNS.  
Whats the output of '`netstat -nltup`' after this ?

And show us what DNS entry you have troubles with ?

`nslookup <TROUBLED_NAME>`

---

<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, 2017, 8:13pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/23 "2017-04-13T20:13:13Z")

</div>

@Mcat12 , I might be wrong but the 'pihole -r' reconfigure option might not be sufficient for this case.

@bcutter, I believe you will experience no troubles if you switch other way around eg 10.0.0.10 for pi-hole and 10.0.0.20 for nginx.

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:19pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/24 "2017-04-13T20:19:50Z")

</div>

Output directly run on the pi:

```
HTTP/1.1 302 Found
Location: https://www.google.com/doubleclick/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Thu, 13 Apr 2017 20:16:49 GMT
Server: sffe
Content-Length: 232
X-XSS-Protection: 1; mode=block

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com/doubleclick/">here</A>.
</BODY></HTML>

```

On Firefox client I get a "Error: connection failed"

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:22pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/25 "2017-04-13T20:22:00Z")

</div>

> I believe you will experience no troubles if you switch other way around eg 10.0.0.10 for pi-hole and 10.0.0.20 for nginx.

That´s exactly how my setup currently looks like. As @Mcat12 said: "looks like the only thing not working is the blocking page" 😑

---

<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, 2017, 8:24pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/26 "2017-04-13T20:24:15Z")

</div>

What does below output ?

`sudo netstat -nltup`

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 13, 2017, 8:25pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/27 "2017-04-13T20:25:28Z")

</div>

Please also run `pihole -d` for a debug token.

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:34pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/28 "2017-04-13T20:34:23Z")

</div>

A lot. The relevant parts should be:

```
sudo netstat -nltup | grep 0.9
tcp 0 0 192.168.0.9:80 0.0.0.0:* LISTEN 19492/lighttpd
sudo netstat -nltup | grep 0.15
tcp 0 0 192.168.0.15:80 0.0.0.0:* LISTEN 7667/nginx -g daemo
tcp 0 0 192.168.0.15:443 0.0.0.0:* LISTEN 7667/nginx -g daemo

```

where 192.168.0.9 = pi.hole (eth0) and 192.168.0.15 = nginx (eth0:0).

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:36pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/29 "2017-04-13T20:36:15Z")

</div>

What do you want me to do with the debug log? Upload? Paste (relevant parts - which one?) here?

E. g. "Resolver Functions Check":

```
Resolution of doubleclick.com from Pi-hole:

; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> doubleclick.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27285
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;doubleclick.com. IN A

;; ANSWER SECTION:
doubleclick.com. 300 IN A 192.168.0.9

;; Query time: 6 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Apr 13 22:28:06 CEST 2017
;; MSG SIZE rcvd: 60

Resolution of doubleclick.com from 8.8.8.8:

; <<>> DiG 9.9.5-9+deb8u10-Raspbian <<>> doubleclick.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5387
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;doubleclick.com. IN A

;; ANSWER SECTION:
doubleclick.com. 299 IN A 216.58.207.174

;; Query time: 40 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Apr 13 22:28:06 CEST 2017
;; MSG SIZE rcvd: 60

Pi-hole dnsmasq specific records lookups
Cache Size:
Upstream Servers:

```

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 13, 2017, 8:40pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/30 "2017-04-13T20:40:07Z")

</div>

The debug program should prompt you to upload the log to our secure debug server, and then it will give you a token that it says to share with us so we can find your log.

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 13, 2017, 8:40pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/31 "2017-04-13T20:40:37Z")

</div>

Did you run that curl command on the Pi-hole or a computer using Pi-hole?

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:43pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/32 "2017-04-13T20:43:08Z")

</div>

On the Pi-Hole pi itself. Only Windows boxes avail... tell me how/where to else run it.

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:47pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/33 "2017-04-13T20:47:27Z")

</div>

---=== Your debug token is : b7ycgdcqow Please make a note of it. ===---

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 13, 2017, 8:52pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/34 "2017-04-13T20:52:58Z")

</div>

It should have shown that lighttpd answered the request, but it looks like it wasn't blocked. Try it again, and also run `nslookup doubleclick.com`.

---

<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, 2017, 8:53pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/35 "2017-04-13T20:53:15Z")

</div>

> [@bcutter](#):
>
> A lot. The relevant parts should be:
> 
> sudo netstat -nltup | grep 0.9  
> tcp 0 0 192.168.0.9:80 0.0.0.0:\* LISTEN 19492/lighttpd  
> sudo netstat -nltup | grep 0.15  
> tcp 0 0 192.168.0.15:80 0.0.0.0:\* LISTEN 7667/nginx -g daemo  
> tcp 0 0 192.168.0.15:443 0.0.0.0:\* LISTEN 7667/nginx -g daemo
> 
> where 192.168.0.9 = pi.hole (eth0) and 192.168.0.15 = nginx (eth0:0).

To reassure you abit, that looks correct.  
No IPv6 stuff ?

`sudo netstat -nltup | grep 'Proto\|lighttpd\|nginx'`

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:58pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/36 "2017-04-13T20:58:31Z")

</div>

Same output when running "curl -i [http://doubleclick.com/test](http://doubleclick.com/test)" on the pi.hole pi itself.  
nslookup doubleclick.com gives

```
Server: UnKnown
Address: 192.168.0.15

Name: doubleclick.com
Addresses: 2a00:1450:4001:817::200e
          192.168.0.9

```

...on Windows and directly on the pi.hole pi:

```
Server: 192.168.0.1
Address: 192.168.0.1#53

Non-authoritative answer:
Name: doubleclick.com
Address: 172.217.16.206

```

Remember: .15 is nginx/other web service, .9 is lighttpd/dnsmasq/pi-hole

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 8:59pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/37 "2017-04-13T20:59:19Z")

</div>

Right, no IPv6. Correctly disabled.

---

<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, 2017, 9:00pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/38 "2017-04-13T21:00:16Z")

</div>

I'll let @Mcat12 answer this one 😃

---

<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, 2017, 9:18pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/39 "2017-04-13T21:18:27Z")

</div>

If I do a nslookup on my Pi, I get:

- 10.0.0.8 being my Pi.

What does below display on your Pi ?

```
$ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1

```

And what does below one display on your Windows clients ?

- Am only interested in the "DNS Servers" part.

`ipconfig /all`

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 13, 2017, 9:19pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/40 "2017-04-13T21:19:08Z")

</div>

The second output means that that device isn't using Pi-hole correctly for some reason, since the domain was not blocked. What about the output of `curl -i http://192.168.0.9/test`?

---

<div class="post-metadata">

**Author:** ![bcutter](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bcutter/32/5769_2.png) [@bcutter](https://discourse.pi-hole.net/u/bcutter)\
**Post date:** [April 13, 2017, 9:25pm UTC](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329/41 "2017-04-13T21:25:35Z")

</div>

```
cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line

```

ipconfig /all on a Windows machine gives:  
`DNS-Server . . . . . . . . . . . : 192.168.0.15`

[Previous page](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329.md?page=1)

[Next page](https://discourse.pi-hole.net/t/conflict-with-other-webservices-running-on-pi-ports-80-and-443/2329.md?page=3)
