nginx force all http to https help
I did do a bunch of reading and testing and can't get anything to change. This is my first run-in with nginx so still feeling around, but basically we want ALL http traffic to switch to https.
The only thing is there is a wildcard cert, so the server_name includes the wildcard, but the whole config is under one server;
server_name localhost *.mydomain.com;
listen 443 ssl;
When I hit the URL I see the following in the logs;
126.96.36.199 - - [12/Feb/2014:22:58:49 -0500] "GET /favicon.ico HTTP/1.1" 400 672 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"
And I am greeted with a 400,
400 Bad Request
The plain HTTP request was sent to HTTPS port
Now, when I change the browser to https all works as expected. I did try separating a single server for http and another with https, with a 301 redirect, but got nothing. Since I am so new, figured I would post this while I continued to read.