Re: Redirect from HTTP to HTTPS does not work

2015-09-08 Thread StSch
> Use "curl -i" to make the http request. See the response. > Use (for example) $host instead of $server_name. Thank you very much for your immediate response and sorry for my late reply. "curl -i" was very useful and using "$host" instead of "$server_name" indeed solved my problem. Thank you ver

Re: Redirect from HTTP to HTTPS does not work

2015-08-11 Thread Francis Daly
On Tue, Aug 11, 2015 at 02:53:21AM -0400, StSch wrote: Hi there, > This is my configuration: > > server { > listen 80; > server_name shell.*; > return 301 https://$server_name$request_uri; > } When you request "http://shell.example.com/uri";, this will redirect to "https://shell.*/uri";,

Redirect from HTTP to HTTPS does not work

2015-08-10 Thread StSch
This is my configuration: server { listen 80; server_name shell.*; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name shell.*; location / { proxy_pass http://192.168.0.16:4200; } } I am using a Dynamic DNS Service to access NGINX running on m