View previous topic :: View next topic |
Author |
Message |
hybernate20 n00b
Joined: 22 Mar 2006 Posts: 64
|
Posted: Sat May 20, 2006 1:21 am Post subject: Password protecting directories in Apache |
|
|
I am running apache 2.0.55 on my home server, so I have access to everything that I want. I was reading on the Apache website that you actually want to use the httpd.conf file and the <Directory> stuff. I am very new to doing this. I Also tried a .htaccess file and that didn't work either. I don't understand if I'm missing somethign somewhere. I used htpasswd to make my password file and put it in /var/www/localhost/passwd, and I added my username. I went into httpd.conf and added a
<Directory /var/www/localhost/htdocs/testing>
AuthType Basic
AuthName "Restricted"
AuthUserFile /var/www/localhost/passwd/passwords
Require user nate
</Directory>
to it and restarted apache and it doesnt do anything different when I go to that page.
I don't exactly know where in my httpd.conf file to add that whole statement, so that could be the problem. Also, I know that there is some AllowOverride that I have to set to something. I guess, basically, I need to know what I'm missing. Sorry if I'm being vague...I'm trying to follow HOWTOs and stuff like crazy, and I'm confused now.
Thanks
-Nate |
|
Back to top |
|
|
tony-curtis Tux's lil' helper
Joined: 20 May 2006 Posts: 111
|
Posted: Sat May 20, 2006 11:56 pm Post subject: |
|
|
There's a HOWTO at the apache website:
http://httpd.apache.org/docs/2.0/howto/auth.html
Oh, and you might want to consider placing the file with the
passwd information outside of any directories managed by
apache (the web document trees). That way, it can't be got
at through HTTP accesses. |
|
Back to top |
|
|
nielchiano Veteran
Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Sun May 21, 2006 5:19 pm Post subject: |
|
|
Moved from Networking & Security to Duplicate Threads.
Moved in favour of https://forums.gentoo.org/viewtopic-t-306691.html _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
|