Hi there,
I’m sure there’s a lot of people hosting their customers on EE here and the most frustrating thing is when they point their entire domain to the server or their domain alternative.
So if someone has website.com domain and point thewebsite.com domain to our server, by default nginx redirects you to alphabetically first config available.
So for V4 I got this extra file called everythingelse.conf in nginx-proxy configuration with this setup:
server {
listen 80 default_server;
server_name everythingelse;
error_page 404 /404.html;
# Everything is a 404
location / {
return 404; #return the code 404
}
This seems to be doing the job, hower, I cannot figure out how to do this for 443 port (https).
Any clues? Also, it would be great if that was built in EE feature (404 for not found hosts rather than default nginx redirect)