The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Password Protect htdocs

Discussion in 'Security' started by grayloon, Aug 24, 2015.

  1. grayloon

    grayloon Well-Known Member

    Joined:
    Oct 31, 2007
    Messages:
    98
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Evansville, IN
    cPanel Access Level:
    Root Administrator
    Twitter:
    I want to create a new tools directory at /usr/local/apache/htdocs/tools and password protect the contents. I've generated /usr/local/apache/htdocs/.htpasswd and referenced it in /usr/local/apache/htdocs/tools/.htaccess. I think the password protection is ignored because /usr/local/apache/conf/httpd.conf has a directive for /usr/local/apache/htdocs with AllowOverride None.

    Should I add a new directive in post_virtualhost_global.conf like this:
    Code:
    <Directory "/usr/local/apache/htdocs/tools">
        Options Includes Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page