Hi,
in /etc/httpd/conf/httpd.conf
#DocumentRoot "/var/www/html"
DocumentRoot "/home/phpmy/html"
when I restarted httpd
[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
[FAILED]
from apache2 - Cant start apache, says html folder not directory - Server Fault
chcon -R -h -t httpd_sys_content_t /var/www/html/
httpd can be run with DocumentRoot set to var/www/html.
so I did the following
chcon -R -h -t httpd_sys_content_t
results are as follow:
for /var/www/html
[root@localhost ~]# ls -laZd /var/www/html/
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /var/www/html/
[root@localhost ~]# ls -laZ /var/www/html/
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 phpinfo.php
for /home/phpmy/html
[root@localhost ~]# ls -laZd /home/phpmy/html/
drwxrwxr-x. phpmy phpmy system_u:object_r:httpd_sys_content_t:s0 /home/phpmy/html/
[root@localhost ~]# ls -laZ /home/phpmy/html/
drwxrwxr-x. phpmy phpmy system_u:object_r:httpd_sys_content_t:s0 .
drwx------. phpmy phpmy unconfined_u:object_r:user_home_dir_t:s0 ..
-rw-r--r--. phpmy phpmy system_u:object_r:httpd_sys_content_t:s0 phpinfo.php
I still don't understand why it don't work.
thanks a lot!