I have a private HTTPS server using nginx. Therefore, I don't care about browser compatibility nor HTTP to HTTPS redirection; I just want it to work in my environment and nowhere else. I have already configured it with "listen 17648 ssl;". Whenever I try to connect to it using plain HTTP, I get the infamous "The plain HTTP request was sent to HTTPS port" response.
Is there any way to prevent nginx from sending any response at all when a HTTP request is sent to a HTTPS port? I would like nginx to simply close the connection if the request is not SSL, or maybe return some SSL-level error but no plain HTTP response at all, not even an error response.