Support for both HTTP and HTTPS requests on port 443

Pasi Kärkkäinen pasik at
Wed Oct 27 17:42:54 MSD 2010


I have HTTPS/SSL server configured like this:

server {
       listen         ssl;
       server_name             ssl.dom.tld

       ssl                     on;
       keepalive_timeout       70;

       access_log              /var/log/nginx/ssl-access.log;
       error_log               /var/log/nginx/ssl-error.log;

       location / {


               proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
               proxy_set_header Host $host;
               proxy_set_header X-Real-IP $remote_addr;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_redirect     off;

Is it possible to forward also *http* (not https) requests made to port 443 
to the backend ( port 443 ?

Yes I know, it doesn't make any sense basicly, but I have a broken
application that wants to receive both http and https requests on port 443.

Is that possible with nginx? 

-- Pasi

More information about the nginx mailing list