Results 1 to 10 of 10

Thread: .htaccess

  1. #1

    .htaccess

    I'm trying to get that to work so that the whole world wont download my mp3s and movies but it dosent work. I have .htaccess and .htpassword

    .htaccess
    Code:
    AuthUserFile /var/www/downloads/.htpasswd
    AuthGroupFile /dev/null
    AuthName Downloads
    AuthType Basic
    
    require valid-user
    .htpassword
    Code:
    guest:pejo9ft9AVhKM

  2. #2

    Re: .htaccess

    Double check your httpd.conf file, and make sure you have

    Code:
    AllowOverride AuthConfig
    for at least the directory you want to protect.

  3. #3

    Re: .htaccess

    I've added that and it still dosnt work.. http://gabe.mine.nu/downloads

  4. #4
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    Re: .htaccess

    Try this instead

    Code:
    AuthUserFile /var/www/downloads/.htpasswd
     AuthGroupFile /dev/null
     AuthName Downloads
     AuthType Basic
    
     <Limit GET>
     require user guest
     </Limit>

  5. #5

    Re: .htaccess

    I've heard of .htaccess a lot before but never found out what it does. Could someone explain it to me?

  6. #6
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: .htaccess

    I've heard of .htaccess a lot before but never found out what it does. Could someone explain it to me?
    It restricts access to web folders. For example you can password protect files on a website that only users who were given a username and password can download or view.

  7. #7

    Re: .htaccess

    It restricts access to web folders. For example you can password protect files on a website that only users who were given a username and password can download or view.
    Oh, so when I try to access a site and Moz pops up with a login prompt (and I'm not talking about the crappy JavaScript ones, either), that's .htaccess doing it? Cool.

  8. #8
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    update: .htaccess

    gmoreno:

    I attempted to I.M. you this afternoon, did you ever get that working?

  9. #9
    Advisor
    Join Date
    Apr 2002
    Posts
    858

    Re: .htaccess

    I had troubles with this for a long time aswell. My problem wats that my httpd.conf file wasn't configured properly and didn't let the .htaccess files override the default. Right now, I am doing what you would be doing from the .htaccess file right from the httpd.conf file. This can be changed though. But, to make apache let the .htaccess files override the defaults you need to change the httpd.conf files from:

    AllowOverride None

    to:

    AllowOverride All

    This will let the .htaccess files override the default security etc. There are also other options you can use instead of None and All, they are briefly mentioned in the httpd.conf file. I hope this helps you out.

  10. #10
    Junior Member
    Join Date
    May 2001
    Posts
    73

    Re: .htaccess


Similar Threads

  1. .htaccess-any help on this?
    By fareen in forum Linux - General Topics
    Replies: 0
    Last Post: 01-20-2006, 08:16 PM
  2. .htaccess
    By luca in forum Linux - General Topics
    Replies: 2
    Last Post: 01-01-2005, 04:49 PM
  3. .htaccess security
    By pinehead in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 06-02-2004, 03:57 PM
  4. htaccess and cookies
    By coltrane in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 12-27-2002, 06:29 AM
  5. apache 1.3: realms and .htaccess
    By Blaqb0x in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 11-20-2002, 05:47 AM

Bookmarks

Posting Permissions

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