PDA

View Full Version : Is home/user the User html directory ?


swiftsage
2005-07-13, 10:35 AM CDT
When I create a new user a subdirectory is created like /home/username .
Is it the User html directory ? How can i access it from internet ?
I noticed that when i type in my ip address a folder named under
var subdirectory(something like /var/www/html) is being displayed .
Iam puzzled how to address a user directory .
Please advise .Thank you .

defkewl
2005-07-13, 10:42 AM CDT
User directory are typed http://yourdomainname/~username

1. $ mkdir /home/username/public_html
2. open up /etc/httpd/conf/httpd.conf

<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 enable

#
# 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>

swiftsage
2005-07-13, 12:56 PM CDT
Thank you very much for your reply .I tried it out but got the following message -
"Starting httpd: Syntax error on line 347 of /etc/httpd/conf/httpd.conf:
UserDir "enable" keyword requires a list of usernames
[FAILED]"
Please advise.

Jman
2005-07-13, 07:58 PM CDT
I believe you can skip the first one, UserDir with the directory is fine. See the docs (http://httpd.apache.org/docs-2.0/howto/public_html.html) for details.

swiftsage
2005-07-13, 10:09 PM CDT
Thanks .Apache restarted ,but now Iam getting a new error -
Forbidden
You don't have permission to access /~swsage on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

swiftsage
2005-07-14, 12:59 AM CDT
I have removed the comments from <director> .... </drectory> also and
chmod 755 public_html directory .But somehow the Forbidden message
is still appearing .Please advise .Thank you .

Jman
2005-07-14, 06:09 PM CDT
You need to set your home directory executable for everyone for them to be able to access public_html. As the user, do chmod +x ~

swiftsage
2005-07-15, 09:41 AM CDT
Thanks Jman ... I got it now :)
I noticed that home directories of users created before I made
changes to httpd.conf does not show .Users created now are
functioning fine .