Web Root Dir Change and New Dir Added issue in CentOS 5
Hi ! I have just configured CentOS server my new office. This is the first time I am using CentOS.
Whenever I am trying to change the webroot of the httpd server, it usually say "directory doesn't exist". whereas which can't be the case as it is home directory of the user.
old webroot : /var/www/public_html
new webroot desired: /home/username/public_html
to achieve this, what Do I need to do?
the second issue, I am facing that whenever I am adding new directories to public_html folder, it is not accessible. as the error page 404 is shown. I have changed the permissions to 0705 and ownership is also transferred to other user.
What else is required to make new directories accessible by the web?
The new webroot is the default for user accounts. Ensure this is set in the httpd.conf
About half way down there are settings for this.
If you are running se_linux don't forget to enable the public_contect_t taget for the path.
For a start you need to enable the UserDir directive in httpd.conf : http://httpd.apache.org/docs/2.0/mod/mod_userdir.html
See also http://www.linuxtopia.org/online_boo...he-config.html
You may have SELinux issue, in which case
chcon -t httpd_sys_content_t index.html
You can check whether SELinux is set correctly by using
semanage fcontext -l | grep http
will show owner/perms/selinux
|All times are GMT -5. The time now is 04:10 AM.|