Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2004

    htpasswd on virtual host (Apache 1.3)

    recently one of my friend ask me to protect come directory on his web page

    actually i ser like this

    AllowOverride none (some of documents suggest AuthConfig)

    ## this on my friend setting for his virtual host #####

    DocumentRoot /home/ryan/public_html
    ServerName ### this only sample #####
    <Directory "/home/ryan/public_html/secret_page">
    deny from all
    AllowOverride AuthConfig
    Order deny,allow

    i just want to ask, is it any difference with some HTML, PHP, CGI scripts to protect on his virtual host setting ?

    i do right ?

  2. #2

    Try this instead...

    <Directory "/home/ryan/public_html/secret_page">
    AuthType Basic
    AuthName "Restricted area!"
    AuthUserFile /etc/httpd/passwd/passwdfile
    Require valid-user

    To create the password file do
    htpasswd -c -n /etc/httpd/passwd/passwdfile <username>
    Restart your server and you should be OK.


    in Linux Computing we Trust

Posting Permissions

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