LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Multiple website on Apache with User Directories (https://www.linuxquestions.org/questions/red-hat-31/multiple-website-on-apache-with-user-directories-403579/)

Mr_Oz 01-15-2006 07:02 AM

Multiple website on Apache with User Directories
 
Hi,

I want to set up users home folders as web sites in Red Hat Enterprise for with Apache. Can anybody get me going in the right direction with this? I am not sure on what exacly i need to do.

jillande 01-15-2006 04:28 PM

there should be a section in your /etc/httpd/conf/httpd.conf file related to user directories. it will look similar to the following code.

to enable user directories, uncomment code as necessary, or start from scratch in a new secton. specify the name for the folder you want to use (i.e. public_html), set options, and restart (or graceful restart) httpd.

the users (or you) can then create a public_html directory and be sure that the httpd user has access to read the contents. so the public_html directory itself probably needs permissions of 755. the users need to make sure their content is readable by the httpd user too, which usually means making the files world-readable. alternatively you could set the sticky bit for them to be sure permissions will work no matter what they do.

Code:

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews SymLinksIfOwnerMatch
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


Mr_Oz 01-16-2006 07:20 AM

Thank you! Is there anything additional i need to do is we are using CGI scripts?


All times are GMT -5. The time now is 02:18 AM.