https rewrite for subdirectory only

gunawan satemie at gmail.com
Sun Dec 26 13:20:14 MSK 2010


Attached is the nginx.conf file, no separtion between server 80 and server
443.

If I make separation between server 80 and server 443, it's ok.

Thanks.



On Sun, 26 Dec 2010 17:23:37 +0800, Edho P Arief <edhoprima at gmail.com>
wrote:

> On Sun, Dec 26, 2010 at 12:20 PM, gunawan <satemie at gmail.com> wrote:
>>
>> Hi,
>>
>> I'm a noob.
>>
>> How to rewrite http to https in /admin location only ?
>>
>> I put something like this in nginx.conf :
>> location /admin {
>>    rewrite     ^(.*)   https://$server_name$1 permanent;
>> }
>>
>> But I always get error message "The page isn't redirecting properly" in
>> Firefox when I browse http://$server_name/admin
>>
>
>
> ...how about posting the full config file you're using.
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the nginx mailing list