Welcome! Log In Create A New Profile

Advanced

Combine location blocks with same content

Lorenzo Raffio
October 06, 2014 09:30AM
location ^~ /categoria/personale-scolastico/area-docenti/ {
                auth_basic                          "Restricted";
                auth_basic_user_file    /var/www/domain/.pswd_docenti;
                try_files $uri $uri/    /index.php?$args;
                include                             /etc/nginx/conf/*.conf;
        }
location ^~ /personale/ {
                auth_basic                          "Restricted";
                auth_basic_user_file    /var/www/domain/.pswd_docenti;
                try_files $uri $uri/    /index.php?$args;
                include                             /etc/nginx/conf/*.conf;
        }


location ^~ /colloqui/bs-events {
                auth_basic                          "Restricted";
                auth_basic_user_file    /var/www/domain/.pswd_docenti;
                try_files                           $uri $uri/ /index.php?$args;
                include                             /etc/nginx/conf/*.conf;
        }






Is there a way to combine these locations? The content of the blocks is the same...
I tried with location ^~ (/categoria/personale-scolastico/area-docenti/|/personale/|/colloqui/bs-events) but didn't work.._______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Combine location blocks with same content

Lorenzo Raffio October 06, 2014 09:30AM

Re: Combine location blocks with same content

B.R. October 06, 2014 11:26AM

Re: Combine location blocks with same content

Lorenzo Raffio October 08, 2014 08:38PM

Re: Combine location blocks with same content

B.R. October 09, 2014 02:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready