Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Return 444 if https port(443) accesed via http

$
0
0
It won't work if you use "ssl" in the listen directive and don't define an ssl certificate and key. You'll see something like this in the error log:

"no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking"

The surest way would be to create a custom error page.

Or perhaps:

server {
listen 1.1.1.1:443 ssl;
server_name abc.com;
ssl_certificate cert.pem;
ssl_certificate_key key.pem;
return 301 http://abc.com$request_uri;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles