Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.
I think it should be:
location /phpmyadmin {
not what you have above. :) (I’ve got a restricted directory set up like that and it works just fine.)
Ok, here’s a stupid question (but it never hurts to ask, right? ::g::): do you have the htpasswd file created, and is it named just htpasswd, not .htpasswd? I ran up against that (the picky file name thing) the other day.
Posted By: robYou might need to set a 'root' directive inside the location /phpmyadmin/ block.
location /phpmyadmin {
auth_basic "Acceso Restringido";
auth_basic_user_file /path/to/htpasswd;
root /path/to/web/site/and/main/phpmyadmin;
}
or whatever the main phpmyadmin page name is. But I wouldn’t think you’d need to have the root directive there if it’s working in the regular location /phpmyadmin block already, just not with the authentication.
Hmm.
Yay!
Out of curiosity, are you trying to make the restriction work for all vhosts you get set up by putting it in the default configuration?
Posted By: movieladyBut I wouldn’t think you’d need to have the root directive there if it’s working in the regular location /phpmyadmin block already, just not with the authentication.
Hmm.
Thankful People:efiplus
Posted By: movieladyYay!
Out of curiosity, are you trying to make the restriction work for all vhosts you get set up by putting it in the default configuration?
location ~ ^/phpmyadmin(/)?$ {
Posted By: robTry replacing your location = .. line with:location ~ ^/phpmyadmin(/)?$ {
The info about the location directive on the English wiki says that the equal sign in the location section makes it only work when the url matches the exact pattern given, in your case “/phpmyadmin” – so I would think that you either need to drop the equal sign in the location declaration location /phpmyadmin or, as you said, clone the current directive you have and change the location directive to location = /phpmyadmin/
Just a guess. :)
1 to 17 of 17