1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Protect Entire Domain (doc root) with htaccess and htpasswd - Not working

Discussion in 'Plesk for Linux - 8.x and Older' started by fishnyc22, Jun 1, 2006.

  1. fishnyc22

    fishnyc22 Guest

    I'm trying to password protect my entire httpdocs directory while in development. (then disabling it later when ready for launch)

    I had it working great last week, but made some changes somewhere (not sure what did it) and now I cant get it to work. I've gone though the process over and over again with now luck.

    I have my .htaccess file with:

    AuthType Basic
    AuthName "Development Access"
    AuthUserFile /etc/apache2/passwd/.htpasswd
    Require valid-user

    I ran the command:
    htpasswd -c /etc/apache2/passwd/.htpasswd USERNAME

    and entered the password 2x. Restarted Apache with:

    /etc/rc.d/init.d/httpd restart

    But no luck. The directory is not protexted. I even tried:

    chmod a+r .htaccess
    chmod a+r .htpasswd

    I'm not sure why it would work and then stop working. all I did was try to add a second user to the .htpasswd file.

    Does any one know if there is ANYTHING else I need to do to make this work.

    Any help would be appreciated!
    I'm running Plesk 8 / Apache2 / Fedora Linux

    Fish ><>
  2. fishnyc22

    fishnyc22 Guest

    After doing a little more research, I noticed that I am able to protect another site with the same htpasswd file basically the same .htaccess file:

    AuthType Basic
    AuthName "Development Access Area"
    AuthUserFile /etc/apache2/passwd/.htpasswd
    Require user USER1 USER2

    Why would this work on one vhost domain and not the other.

    Anyone with any thoughts on this would really be helping me out a lot.


  3. fishnyc22

    fishnyc22 Guest

    I figured it out after doing a little more research. apparantly. I needed to let plesk know to use the vhost.conf file with this command:

    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

    I don't understand why I would need to do this for one domain and not the other.

    any thoughts?