Protecting certain folder in a virtual host

I run an apache web server, utilizing named virtual host.
I want to password protect a subfolder in the virtual host, for example this folder :

http://www.mydomain.com/tmp/

I know that I should use .htacess, but how to put this into httpd.conf ?

Here is part of my httpd.conf configuration:

DocumentRoot "/var/www/html"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny
Allow from all

</Directory>

<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot /home/www/mydomain.com/html/
ScriptAlias /cgi-bin/ /home/www/mydomain.com/cgi-bin/
ServerName mars.mydomain.com
ErrorLog /home/www/mydomain.com/logs/mydomain.com-error_log
CustomLog /home/www/mydomain.com/logs/mydomain.com-access_log common
CustomLog /home/www/mydomain.com/logs/mydomain.com-deflate_log deflate
</VirtualHost>

 

 

 

 

Top