WEB UGHHHH!! cannot get stupid htaccess and htpasswd to work!!!

Discussion in 'OT Technology' started by chechen, Apr 3, 2008.

  1. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    I put them in the same freaking folder, and it still wont work!!!

    .htaccess contents =

    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /var/www/html/test/.htpasswd
    AuthGroupFile /dev/null
    require valid-user

    .htpassd contents =

    user:1wotS8I0JMmO.



    this seems like it should be VERY easy, but I just get prompted for my password, and it never lets me go through :(
     
  2. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    do it in your control panel.
     
  3. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    it wont let me do that :(

    i have to do it this way
     
  4. Necromancer

    Necromancer Guest

    Who be your host?
     
  5. Slid.

    Slid. I'm a guy.

    Joined:
    Oct 25, 2001
    Messages:
    1,928
    Likes Received:
    0
    Location:
    NH
  6. Vtec44

    Vtec44 OG!

    Joined:
    Mar 15, 2000
    Messages:
    555
    Likes Received:
    0
    Location:
    So. Cal.
    .htpasswd file should be above your public_html folder.
     
  7. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Mine are in a folder called .htpasswds ...
     
  8. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    i have tried putting it all over the place.. i still get the same result
     
  9. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
  10. Logik

    Logik Livin la vida broka

    Joined:
    Jun 30, 2000
    Messages:
    20,667
    Likes Received:
    1
    Location:
    The Steel City
    try this and make sure you hit enter after the last line...

    .htaccess
    Code:
    AuthUserFile /full/path/to/.htpasswd
    AuthName "Private"
    AuthType Basic
    
    <Limit GET POST PUT>
    require valid-user
    Order Deny,Allow
    Deny from all
    Satisfy Any
    </Limit>
    
    .htpasswd
    Code:
    user:test
    
    and yes .htpasswd should be outside of public_html but it doesnt have to be... you can protect the .ht's with this:

    Code:
    <Files .htaccess>
     order allow,deny
     deny from all
    </Files>
    
    <Files .htpasswd>
     order allow,deny
     deny from all
    </Files>
    
     
  11. Vtec44

    Vtec44 OG!

    Joined:
    Mar 15, 2000
    Messages:
    555
    Likes Received:
    0
    Location:
    So. Cal.
    .htpasswd
    Code:
    userid:fsdf32sPk
    
    .htaccess
    Code:
    AuthUserFile /usr/home/myaccount/password/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic
    
    require user userid
    
     
  12. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA

    didnt work
     
  13. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    also didn't work :wtc:

    i cant believe this..
     
  14. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    can someone help me over AIM?

    PM me please please :(
     
  15. Logik

    Logik Livin la vida broka

    Joined:
    Jun 30, 2000
    Messages:
    20,667
    Likes Received:
    1
    Location:
    The Steel City
    how are you typing this .htaccess? are you making a notepad file in Windows and uploading it to a *nix server? I've found that doesnt always work... Can you SSH into the webserver and nano/pico/vi the .htaccess yourself?
     
  16. Vtec44

    Vtec44 OG!

    Joined:
    Mar 15, 2000
    Messages:
    555
    Likes Received:
    0
    Location:
    So. Cal.
    There are few things to check

    1. Make sure that .htaccess is working for that folder. You can a few lines of code to change the default index to like welcome.html and test to see if .htaccess in that folder will actually take over control.

    2. If that works, then check to make sure that you're pointing to the right password file location

    :dunno
     
  17. chechen

    chechen Brazilian Jiu Jitsu OT Supporter

    Joined:
    Sep 29, 2003
    Messages:
    23,881
    Likes Received:
    0
    Location:
    Irvine, CA
    message me on aim @ ham00m please :hs:
     
  18. Vailripper

    Vailripper Daywalkers have feelings too.

    Joined:
    Jan 25, 2006
    Messages:
    6,170
    Likes Received:
    0
    Location:
    Bellingham, WA
    Kinda basic, but make sure your host allows you to use custom .htaccess files.
     

Share This Page