Apache to read from /home/user/public_html on CentOS 5.7

Posted by C.S.Putra on Server Fault See other posts from Server Fault or by C.S.Putra
Published on 2012-01-19T07:07:32Z Indexed on 2013/11/08 4:00 UTC
Read the original article Hit count: 535

Filed under:
|
|
|

this is my first experience using CentOS 5.7 / Linux as my web server OS and I have just finished installing Apache. Then I created a new account using WHM. The account is now created and the domain name can be accessed. I have put the web files under /home/user/public_html/ but when I access the domain assigned for that user which I assigned when creating new account in WHM, it doesn't read the files.

In /usr/local/apache/conf/httpd.conf :

<VirtualHost 175.103.48.66:80>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /home/user/public_html
ServerAdmin [email protected]
User veevou # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup group1 group1
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup group1 group1
</IfModule>
CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/domain.com combined
ScriptAlias /cgi-bin/ /home/user/public_html/cgi-bin/
</VirtualHost>

Instead of reading from /home/user/public_html/ apache will read the /var/ww/html/ folder. How to set the apache so that when user access www.domain.com, they will access the files under /home/user/public_html/ ? Please advice. Thanks

© Server Fault or respective owner

Related posts about linux

Related posts about apache2