httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mandy Singh" <man...@gmail.com>
Subject Re: [users@httpd] htaccess and htpasswd
Date Thu, 09 Aug 2007 18:29:09 GMT
Thanks Tony.

Doing the following inside the VirtualHost tag did it -

<VirtualHost 127.0.0.1:80>
    ServerAdmin admin@dev.com
    DocumentRoot F:\xampp-lite\xampplite\htdocs\c\trunk\app\webroot
    ServerName dev.c.com
    ErrorLog F:\xampp-lite\xampplite\apache\logs\error_log
    CustomLog F:\xampp-lite\xampplite\apache\logs\access_log common
    <Directory />
      AuthType Basic
      AuthName "Authentication Required"
      AuthUserFile "/var/www/html/.htpasswd"
      Require valid-user

      Order allow,deny
      Allow from all
    </Directory>
</VirtualHost>


On 8/9/07, Tony Stevenson <tony@pc-tony.com> wrote:
>
> Mandy Singh wrote:
> > Hi Tony,
> >
> > Yes I needed to move stuff to the httpd.conf file, but still how does
> > one do domain level password protection. Your example is directory level
> > password protection that would apply to all Virtual Hosts.
> >
> > Any idea on domain level?
> >
> In the vhost you want to 'protect' use :
>
> <Location />
> Pass Auth text in here
> </Location>
>
> This will then apply only to that vhost, and not the FS path.
>
> let me know how you get on.
>
>
> Tony
>
>
>

Mime
View raw message