1

How do I change/override the authentication in apache to a different one in a subfolder?

I tried this one but it didn't work. How can I fix it?

<Directory "/">
    AuthName "Front End Access"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile "xxxxxxx/.htpasswd_frontend"
    Require valid-user
</Directory>

<Directory "/backend/">
    AuthName "Back End Access"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile "xxxxxxx/.htpasswd_backend"
    Require valid-user
</Directory>

I have made a search, they showed up how to disable autentication, but I don't want to disable it: I want to change the AuthUserFile to a different one (and possibly change the AuthName)

Thank you in advance

1 Answers1

0

Does your server's file system really have a top-level directory named /backend?

I suspect that what you need is to replace <Directory /backend> by either e.g. <Directory /var/www/html/backend> or <Location /backend>. See Configuration sections.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
  • deary me, i thought it was relative to apache's root directory :P thank you and shame on me –  Mar 03 '14 at 10:53