Rewrite non-ssl to ssl except for given location

Edho Arief edho at myconan.net
Sun Apr 15 15:43:46 UTC 2012


2012/4/15 Adnan RIHAN <adnan at rihan.fr>:
> location / {
> return 301 https://$host$request_uri;
> }
> location = /includes/api.php {
> ...
> }
>
> The problem is that I'm on a web hosting service which allow s customers to
> edit an included config file.
>  So, "location /" is a duplicate :/
>

This is valid:

    location / {
      location / {
      }
    }



More information about the nginx mailing list