LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache (https://www.linuxquestions.org/questions/linux-server-73/apache-604727/)

dellthinker 12-05-2007 12:29 PM

apache
 
Hi all, this is very frustrating to figure out. Im trying to setup UserDir on my apache server so my other users can have pages of their own. But its not working.

I read this page and its not explaining correctly. What ive done so far is the below shown.

First i edited httpd-userdir.conf and replaced some of the config like so.

Code:

UserDir enabled user
UserDir disabled root

But when i open my browser to http://mysite.com/~user I get a forbidden error telling me i cant access it. Can any please explain thoroughly what im doing wrong? Thanx in advance!

reddazz 12-05-2007 12:37 PM

In addition to what you did above, you also need to do
Code:

$chmod 755 /home/$USER
$mkdir /home/$USER/public_html
$chmod 755 /home/$USER/public_html

If you use a Red Hat based distro and have selinux enabled, you may need to do
Code:

#chcon -t httpd_sys_content_t /home/$USER/public_html

dellthinker 12-05-2007 01:29 PM

Ugh!!!, do i do this as root or as the user? Because i did it as root and nothing is changed as far as i can see.

When i did those chmod commands i noticed inside the file httpd-userdir.conf there was this section.

Code:

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

The access denied problem was solved, but now its still not working. Does this section i pasted need to be edited? Also, is there a place where i can _read_ about this that actually makes _sense_ ? Thanx in advance!

dellthinker 12-05-2007 02:15 PM

Nevermind, i sorted it out.


All times are GMT -5. The time now is 10:06 AM.