#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    HK
    Posts
    6
    Rep Power
    0
      Do you know how to set up a password control for a website directory on Linux/apache server? I know should use .htaccess file and access.conf file.
      
       1) I''ve set up directory data in access.conf like this:
      
       <Directory "/export/home/harley/public_html">
       AllowOverride None
       Options None
       #Options All Multiviews
       #AllowOverride AuthConfig
       #Order allow,deny
       #Allow from all
       </Directory>
      
       2) And I made a .htaccess file like this:
      
      
       AuthName Harley
       AuthType Basic
       AuthUserFile /home/harley/harley.passwd
       require valid-user
      
      
       What else work should I do to make the directory under password control?

    E-mail me: goodgoodtom@yahoo.com
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Start here -> http://www.apache.org/docs/mod/core.html#allowoverride

    >>AuthUserFile /home/harley/harley.passwd

    Make sure your harley.passwd is world-readable (644).
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    HK
    Posts
    6
    Rep Power
    0
    Why it still doesn't work after I set up a world-readable harley.passwd file for the directory?

    When I access the http://***.***.***/~harley/secret/love.html webpage, there is no password control, do you know why?

  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    I told you to read http://www.apache.org/docs/mod/core.html#allowoverride , have you done so yet?

    >>there is no password control, do you know why?

    Because your <Directory> block tells apache not to read .htaccess file at all.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    HK
    Posts
    6
    Rep Power
    0
    Thanks, I am working on it.

    By the way, do you know how to access MySQL database with Python through web?

    Hope to get your assistance as I am doing a study project about it.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>do you know how to access MySQL database with Python through web?

    Don't know Python but you can try here ->
    http://dustman.net/andy/python/MySQLdb/

IMN logo majestic logo threadwatch logo seochat tools logo