okkezSS
1
Hi
i try set up http auth in one of my domain sub-folder but httpauth not
work properly.
mys conf.
location /adm/ {
auth_basic Restrito;
auth_basic_user_file /var/www/tv/adm/.htpasswd;
}
Ii type http://mydomain.com/adm/ ask for credentials prompt but if type
http://mydomain.com/adm/index.php not show any credentials prompt and
protected page are printed.
Thak’s for any help
Posted at Nginx Forum:
On Wed, Nov 17, 2010 at 1:30 PM, maar3amt [email protected] wrote:
auth_basic_user_file /var/www/tv/adm/.htpasswd;
}
Ii type http://mydomain.com/adm/ ask for credentials prompt but if type
http://mydomain.com/adm/index.php not show any credentials prompt and
protected page are printed.
Thak’s for any help
add
location /adm/.*\.php$ {
auth_basic Restrito;
auth_basic_user_file /var/www/tv/adm/.htpasswd;
<php config goes here>
}
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
On 11/17/10 1:37 AM, Edho P Arief wrote:
auth_basic Restrito;
add
location /adm/.*\.php$ {
auth_basic Restrito;
auth_basic_user_file /var/www/tv/adm/.htpasswd;
<php config goes here>
}
An alternative is to do it all in one location:
location ^~ /adm/ {
auth_basic Restrito;
auth_basic_user_file /var/www/tv/adm/.htpasswd;
location ~ .php$ {
…
}
}
The “^~” forces that location to be checked for before regular
expressions. See http://wiki.nginx.org/HttpCoreModule#location.
–
Jim O.
Top posting because that’s where the insertion point is, is like
shitting in your pants because that’s where your asshole is.