For the past few weeks I am hunting for a solutions to setup 404 nginx config for default host on port 443. And no solution so far.
To clarify the question properly. Lets take quora.com as example which is running on nginx.
Now Quora.com's public ip is 192.229.182.210 and when you enter the following it shows the following results
http://192.229.182.210 - shows 404 https://192.229.182.210 - Server could be tricking -> then shows 404
Hint - Most other servers running on nginx, says invalid certificate and then forwards to its production host. Example - wordpress.org
The question is should you use a ssl snippet on the default config to pass the 404 as quora's public https ip shows? If yes, was it self signed? If no ssl used, how is it done?
My current config is
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 403;
}