Pi-hole with Nginx: Port 80 not usable?

Neither am I, but to my knowledge and also with a search on the internet i did not find anything about a bind keyword for the nginx config file. The nginx listener config I sent is how to bind it to a specific ip, I checked again with the nginx documentation.
Also my nginx server works fine if set to any other port than 80. If I set it to listen on port 80 it throws an error that it cannot bind to the configured address:port which indicates that there is something else already listening on said address:port but I can't seem to figure out what that is as the netplan output shows everything correct / how it should be.
To me the "mistake" is not with nginx or my config of it but rather something with lighttpd or something else :man_shrugging:

That is not a port issue, that is an IP issue. If it was lighttpd bound to port 80 that was the issue then the error would be:

bind() to IP:80 failed (98: Address already in use)

1 Like

For me, the link to nginx docs I've provided for you above lists the bind keyword prominently at the start of the third line:

1 Like

I got it now.
listener in nginx config had to look like this: listen 172.16.1.3:80 default_server bind;

@Bucking_Horn My mistake, I got some things mixed up and did not see you provided a link, must've skipped that for some reason and not thinking about it anymore. Thanks a lot :+1:

@DanSchaper That does make sense now, I interpreted to much and since both errors result in failing to assign a listener i thought it was the same, thanks a lot

1 Like

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