Password Protect a Folder

Discussion in 'General' started by abdi, Jul 8, 2013.

  1. abdi

    abdi New Member

    Hello Everybody,

    I need some help ...
    Currently I am allowing authentication to the /administrator folder by (and this working fine for me):

    location /administrator {
    <tmpl_var name='web_document_root_www_proxy'>
    index index.html index.php;
    auth_basic "Members Only";
    auth_basic_user_file <tmpl_var name='stats_auth_passwd_file'>;

    However, the problem with that is if a user installs say Joomla in a subfolder within root eg

    /joomla/ then that setting does not take effect.

    I would like to take effect to any administrator folder accessed via the web regardless of the folder level .


    and etc ..

    ALL those should be authenticated based on my .htaccess file defined above.

    Please advice me on how I can modify the above directive to support that ...
  2. abdi

    abdi New Member

    I think I have figured it out ...

    I used:

    location ~*/(admin|administrator|wp-admin) {

Share This Page