-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server IP resolves to first site #1777
Comments
I had the same issue, so I added the following code to the top of the default Nginx file found at
Note, this only works for HTTP. I could not get it working for HTTPS. |
Thanks for that! A fix for HTTPS would be great. |
A solution for both HTTP and HTTPS might look like this:
Note: 444 is returned, which instructs Nginx to drop the connection rather than return an error page. The user sees "This site can’t be reached" in the browser. Refs: |
Hey @mikelittle thanks so much for that. I did something similar on my own referencing the docs, and it still redirects to the first site created when going to the server IP. To clarify, I put your code as the the top server block of /opt/easyengine/services/nginx-proxy/conf.d/default.conf It still had the issue once I restarted NGINX, and once I rebooted the server, the changes were gone from the config. |
I think this is because you can't have
it works. (I was only checking with |
Thanks for your help @mikelittle. I've tried your updated code but SSL still redirects to a site on my server rather than dropping the connection. Here's the output from curl.
|
I also can't figure out a spot to place the code that isn't wiped after a reboot. |
Also bothered by this, mostly because the first site I set up is one I don't want to be seen much! |
I was facing the same. Disabling and then re-enabling website fixed the issue |
@perochak Can you please go into more detail? Thanks. |
I tried the same and it didn't work for me. Same issue. |
I have 3 websites published first on the server. 1 was pointing to a domain and 2 were not. |
Thank you, but sadly that does not work for me. So, I still have the problem. |
Thanks! FYI I got a browser warning about SSL certificate mismatch (SSL from my first site) and also 502 Bad Gateway. I disabled and re-enabled the first site and everything is working nicely. |
Would be good to not have to workaround this. |
I have a server with several sites on it. When I put the IP address of the server into a web browser one of the sites shows up. I feel the expected behavior here is to return 444, not forward to a domain.
The text was updated successfully, but these errors were encountered: