LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2004, 09:29 AM   #1
fledermaus
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
Question Apache: making a dir with username and pwd


Hi everyone,

could you please help me? I'm having a webserver running red hat 9 and apache. Now I want to create a userdirectory (dir allready exists in wwwroot) and I want to make it private. So people have to use a username and password when they want to access that directory.

Can someone explain how I can do that?

thank you very much,

fledermaus
 
Old 05-13-2004, 09:40 AM   #2
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 210

Rep: Reputation: 30
Easy... Running apache 2 ??
backup you config file
(cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak)

Open it:
vi /etc/httpd/conf/httpd.conf

look for the above lines and read them :-)

Everything you need IS there. If you need more help, repost ASAP!!

Good luck and keep me posted!




# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html

</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reset pwd to root's current pwd? ataraktos2 Linux - General 10 04-26-2005 04:13 AM
apache username tethysgods Linux - Software 6 07-08-2004 09:45 AM
PWD question : Current dir not full path facets Programming 2 06-09-2004 04:58 AM
Making a program load from any dir boyblitz Linux - Newbie 4 10-09-2003 10:38 AM
forget UserName/pwd and can't install modem HadiHasan Linux - General 1 03-10-2003 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration