Forum Moderators: phranque

Message Too Old, No Replies

customize apache configuration

         

nowlearner

11:36 am on Apr 13, 2010 (gmt 0)

10+ Year Member



have installed Centos 5.4 on my machine and install LAMP on my laptop.

selinux is disable


[root@localhost ~]# rpm -qa | grep selinux
libselinux-1.33.4-5.5.el5
libselinux-devel-1.33.4-5.5.el5
libselinux-python-1.33.4-5.5.el5
selinux-policy-devel-2.4.6-255.el5_4.4
libselinux-utils-1.33.4-5.5.el5
selinux-policy-targeted-2.4.6-255.el5_4.4
selinux-policy-2.4.6-255.el5_4.4
[root@localhost ~]# /usr/sbin/getenforce
Disabled
[root@localhost ~]#


every thing is working fine initially, i.e mysql and apache and php is working, i.e. i created a index.php file


<?php
phpinfo();
?>

it displays php configurations

up to now every thing is fine.

however

intially Document root is set as follow,


DocumentRoot "/var/www/html"


i.e. u need to be root to create files, which in my opinion is not very correct so i change the following in /etc/httpd/conf/httpd.conf



<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
DocumentRoot /home/doordie/www/html/
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common


after I restart I got the


[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@localhost ~]#


Forbidden

You don't have permission to access / on this server.
Apache/2.2.3 (CentOS) Server at localhost Port 80

anyone care to share how can I configure such that I can see my files?

thanks a lot!

OTSGMan

8:43 pm on Apr 18, 2010 (gmt 0)

10+ Year Member



you need to make sure apache has read access to the new folder