Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    345

    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 [email protected]
    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>

  2. #2
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,573
    do you have AccessFileName .htaccess ?

    try creating .htaccess file and refresh apache
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

  3. #3
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    Please check this to implement Htaccess,
    http://freebsdhowtos.com/28.html

    Regards,

    Bright

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •