Force https

Igor Sysoev is at rambler-co.ru
Sun Mar 4 22:56:20 MSK 2007


On Sat, Mar 03, 2007 at 07:45:15AM -0500, Wayne E. Seguin wrote:

> Can someone either tell me or point me to the correct documentation  
> on how to force a subdomain to use https only?
> 
> Eg. Client goes to http and gets forced to https.
> 
> Also,
> 
> Would it be useful for me to write up my config file showing how  
> authentication is done with https?
> I did have some confusion with it myself.

     server {
          listen   80;
          rewrite  ^(.*)  https://site.com$1  redirect;
     }

     server {
          listen   443;
          ...
     }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list