[GH-ISSUE #1485] Access to website by domain only, not IP address #1143

Closed
opened 2026-02-26 06:35:56 +03:00 by kerem · 4 comments
Owner

Originally created by @xNako on GitHub (Oct 14, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1485

Hi, how can I block the access by IP to nginx docker container? If I access by IP address it shows default nginx page, I want to show nothing

Originally created by @xNako on GitHub (Oct 14, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1485 Hi, how can I block the access by IP to nginx docker container? If I access by IP address it shows default nginx page, I want to show nothing
kerem 2026-02-26 06:35:56 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@the1ts commented on GitHub (Oct 25, 2021):

I'm a little unsure why you want to show nothing. It cannot be for secrecy of the IP since the client has setup a TCP/IP connection with the web server before the client sends the request for the GET / on just the IP address, so the client knows the IP is listening on port 80 or 443 before the request for just the IP is sent.

Also, all well configured clients if asking for a webserver by IP address will send the IP as the hosts header and the agreed standard is they will get the default server if not setup for anything else, it is there to handle misconfigurations and errors. If it is a badly configured client it will not send a hosts header with the IP and by specification the server must respond with a 400 error and Nginx will do that unless it is overridden by user configuration. This 400 error is by specification of http 1.1 which Nginx respects and I think so should NPM by default.

Since the requested configuration is not a good default configuration it is likely to need an override ability via the UI or more likely the ability to change the default server configuration, this is not currently available to be configured by the UI and I'm sure its not a trivial piece of work to make it available, so a good explanation of your reasons for this override will go a long way to convincing someone to look at that work.

<!-- gh-comment-id:950723627 --> @the1ts commented on GitHub (Oct 25, 2021): I'm a little unsure why you want to show nothing. It cannot be for secrecy of the IP since the client has setup a TCP/IP connection with the web server before the client sends the request for the GET / on just the IP address, so the client knows the IP is listening on port 80 or 443 before the request for just the IP is sent. Also, all well configured clients if asking for a webserver by IP address will send the IP as the hosts header and the agreed standard is they will get the default server if not setup for anything else, it is there to handle misconfigurations and errors. If it is a badly configured client it will not send a hosts header with the IP and by specification the server must respond with a 400 error and Nginx will do that unless it is overridden by user configuration. This 400 error is by specification of http 1.1 which Nginx respects and I think so should NPM by default. Since the requested configuration is not a good default configuration it is likely to need an override ability via the UI or more likely the ability to change the default server configuration, this is not currently available to be configured by the UI and I'm sure its not a trivial piece of work to make it available, so a good explanation of your reasons for this override will go a long way to convincing someone to look at that work.
Author
Owner

@nilshee commented on GitHub (Nov 23, 2021):

Hey,
I have a kinda related issue.
Our Companys security scan is complaining about a Certificate issued for/by localhost(because it is also scanning the ip with https and the dummy certificate is issued for localhost). Is it possible to serve a different default server or maybe none?
Thank you.

<!-- gh-comment-id:976902371 --> @nilshee commented on GitHub (Nov 23, 2021): Hey, I have a kinda related issue. Our Companys security scan is complaining about a Certificate issued for/by localhost(because it is also scanning the ip with https and the dummy certificate is issued for localhost). Is it possible to serve a different default server or maybe none? Thank you.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 3, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1974976618 --> @github-actions[bot] commented on GitHub (Mar 3, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Apr 16, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2808021375 --> @github-actions[bot] commented on GitHub (Apr 16, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1143
No description provided.