I know how to redirect all http request on nginx to https, but if I am only running nginx on a non-standard port (9575) then how can I reject any connections that do not use SSL/TLS?
            Asked
            
        
        
            Active
            
        
            Viewed 809 times
        
    1 Answers
1
            According to this answer, this should work:
server {
        listen 9575 ssl;
        error_page 497 https://$host:$server_port$request_uri;
}
 
     
    