On Thu, Jun 27, 2013 at 01:02:30PM -0400, Ben Johnson wrote:
> On 6/27/2013 12:42 PM, Ben Johnson wrote:

Hi there,

> > I don't want PMA (anything within the /pma/ location) to be accessible
> > over a plaintext connection. In other words, I wish to force HTTPS.

> location ^~ /pma/ {
>     root /var/www/;
> 
>     if ($scheme = http) {
>         return 301 https://$server_name$request_uri;
>     }
> 
>     # ...
> }
> 
> If there's a better way of achieving the same, I'd love to be informed.

The usual suggestion is that different server configurations best live
in different server blocks.

You have other reasons not to want to do that here -- including the
repetition aspect.

I'd say that what you have here is the best way.

        f
-- 
Francis Daly        [email protected]

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to