How to stop IP resolving to one of my sites? #1616
-
Hi, I have a server with several named hosts on it. For some reason when I put the IP address of the server into a web browser one of the sites shows up. I would prefer that didn't happen unless someone entered the site name. How can I do that? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 6 replies
-
I'd love to know as well! |
Beta Was this translation helpful? Give feedback.
-
hm, somehow I did fix this or it changed in a recent version, because now I get an nginx 404 at the ip (which is better than a site showing anyway) |
Beta Was this translation helpful? Give feedback.
-
Ah, I am running 4.5.6 so I will update to latest stable. |
Beta Was this translation helpful? Give feedback.
-
I am on 4.6.5 and still have this issue. |
Beta Was this translation helpful? Give feedback.
-
Perhaps I changed something in my config back then, let me take a look and try to see what that might have been... |
Beta Was this translation helpful? Give feedback.
-
Ok, I THINK I found it. Going into this file:
|
Beta Was this translation helpful? Give feedback.
-
If you reboot the server, does that fix persist, or is it overwritten? There's another thread with fixes but if the server restarts they are all wiped. And if you go to https:// that should throw up a warning, but still forward to the first site. |
Beta Was this translation helpful? Give feedback.
-
ok this took way longer than I wanted, but I have a good solution (for my needs anyway):
then, edit the index.html file inside htdocs to say whatever you want. Mine says "Nothing to see here." |
Beta Was this translation helpful? Give feedback.
ok this took way longer than I wanted, but I have a good solution (for my needs anyway):
ee site create 1.1.1.1
(put your IP in there)ee site update 1.1.1.1 --ssl=self
then, edit the index.html file inside htdocs to say whatever you want. Mine says "Nothing to see here."