Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Password protecting directories in Apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
hybernate20
n00b
n00b


Joined: 22 Mar 2006
Posts: 64

PostPosted: Sat May 20, 2006 1:21 am    Post subject: Password protecting directories in Apache Reply with quote

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
View user's profile Send private message
tony-curtis
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2006
Posts: 111

PostPosted: Sat May 20, 2006 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sun May 21, 2006 1:45 pm    Post subject: Reply with quote

just found this post: https://forums.gentoo.org/viewtopic-t-464251.html
seems to be the same
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun May 21, 2006 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum