1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Password Protection Not working

Discussion in 'Plesk for Linux - 8.x and Older' started by aviscat, Dec 19, 2005.

  1. aviscat

    aviscat Guest

    0
     
    I have been using .htaccess and .htpasswd and have't changed the files at all when moving to my new Plesk 7.5.4 controlled server. The prompt for user name and password comes up and I know I am using the correct one but it won't accept it. Please help me. I need to get this workinfg as I am moving an osCommerce shopping cart to this server this week. Have it set up on another domain for testing purposes. This did work when I tested it on a different shared hosting.
     
  2. tmonsen

    tmonsen Guest

    0
     
    I would suggest looking at the path in you .htaccess file. If you have the full path listed in the file, and this is a new install of 7.5.4 the path to the webdirectory has changed. Instead of /home/httpd/vhosts/domain.com/httpdocs, it may now be /var/www//vhosts /domain.com/httpdocs. If that doesn't appear to be the problem, please post the contents of the .htaccess file , it may help troubleshoot the issue.
     
  3. aviscat

    aviscat Guest

    0
     
    Thanks. I know I tried this earlier today but now it works. I can rest easy. Whew!!! I changed it back to /var/www/vhosts /domain.com/httpdocs and now I have what I need.
     
  4. aviscat

    aviscat Guest

    0
     
    I typed too soon. Now I am in an endless loop of entering the password and for some reason the screen isn't formatting like it should. Yes I uploaded the CSS file in ASCII. The catalog works fine. The admin doesn't.
     
  5. criticman

    criticman Guest

    0
     
    Please let me know, because after a restore (and change in directory structure), my password protected directories loop too. I fixed the directory path, but still no luck...

    --.htaccess--

    AuthType Basic
    AuthName "Alumni Email System"
    AuthUserFile /var/www/vhosts/XYZ.org/httpdocs/alumni/email/.htpasswd
    Require user XXX

    ----------------

    UPDATE: Found solution in another thread [thread link]
    In order to do the htpasswd, you need to use the psa one:
    /usr/local/psa/admin/bin/htpasswd -c .htpasswd

    Fixed it for me!
     
  6. aviscat

    aviscat Guest

    0
     
    I am very new at this. Can you give me step by step instructions or maybe we could chat via a messenger program?
     
  7. criticman

    criticman Guest

    0
     
    Go in to the directory you want to password protect. We will pretend you have a client somedomain.com and the hosting path is:
    /var/www/vhosts/somedomain.com/httpdocs

    If you have pico (which if you are new, I recommend it as it is easier to pick up and use than vi - is like Windows Notepad),
    pico .htaccess

    Put the following in that file:
    AuthType Basic
    AuthName "MESSAGE YOU WANT USER TO SEE WHEN ASKED FOR USERNAME AND PASSWORD"
    AuthUserFile /var/www/vhosts/somedomain.com/httpdocs/.htpasswd
    Require user USERNAMEFORDIRECTORYLOGIN


    Save that and close your text editor. While back at the command line,
    /usr/local/psa/admin/bin/htpasswd -c .htpasswd USERNAMEFORDIRECTORYLOGIN

    It will prompt you for the desired password, enter it, hit [ENTER], it will ask to confirm, enter it again, hit [ENTER].

    Restart apache,
    /etc/init.d/httpd restart

    And try loading the web page. It should all work then.
     
Loading...