note 71116 modified in install.unix by danbrown
| From: | danbrown@php.net | Date: | Thu, 15 Jan 2009 03:53:58 +0000 |
| Subject: | note 71116 modified in install.unix by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149232@lists.php.net to get a copy of this message | ||
I am new to linux/apache/php (coming from server 2003/IIS/Asp.Net), so i was stumped as to why
php/apache could only use static content. Also, it couldn't access some documents that you
created somewhere else, and then dragged into the HTML directory.
After some research, i found the problem was the SELinux context of the files. It took me forever to
find the Proper command to use to change that, as all the examples on the net were out dated using
old commands:
# chcon "user_u:object_r:httpd_sys_content_t" /var/www/html -Rc
This will change the SELinux context of all the documents under the /var/www/html directory (which
is the web directory under Fedora), to allow the httpd process to access them, and the
'-Rc' flag will make the changes Recursive, and will output it's progress for each
file that it sucessfully changes.
--was--
In response to the guy who posted about the SELinux:
I am new to linux/apache/php (coming from server 2003/IIS/Asp.Net), so i was stumped as to why
php/apache could only use static content. Also, it couldn't access some documents that you
created somewhere else, and then dragged into the HTML directory.
After some research, i found the problem was the SELinux context of the files. It took me forever to
find the Proper command to use to change that, as all the examples on the net were out dated using
old commands:
# chcon "user_u:object_r:httpd_sys_content_t" /var/www/html -Rc
This will change the SELinux context of all the documents under the /var/www/html directory (which
is the web directory under Fedora), to allow the httpd process to access them, and the
'-Rc' flag will make the changes Recursive, and will output it's progress for each
file that it sucessfully changes.
http://php.net/manual/en/install.unix.php