If you're getting a "permission denied" error when Apache tries to read and serve out a file, even though the file-system permissions are correct, then it's most likely due to the SELinux context issue.For Apache to be able to read the file, the file needs to have SELinux context something like "system_u:object_r:httpd_sys_content_t:s0"To find out the current SELinux context of files, "ls -alZ"To change the SELinux context of a file:chcon <Context> <File>e.g. chcon system_u:object_r:httpd_sys_content_t:s0 index.html
When you get an error something like "SQLSTATE[HY000] [2003] Can't connect to MySQL server" with a subsequent error code "13" later on in the error message....
This is due to selinux preventing the web server from making external network connections.
To fix this, issue the following command as root:
setsebool -P httpd_can_network_connect=1
Use the command:/usr/sbin/apache2 -lNote: adjust accordingly for distros that use "httpd" instead e.g. Redhat based ones
Apache comes installed on Mac OS 10.5.The config files are in:/etc/apache2/The log files are in:/private/var/log/apache2/To start the server:sudo /usr/sbin/httpd -k startTo enable PHP, uncomment this line in /etc/apache2/httpd,conf:LoadModule php5_module libexec/apache2/libphp5.soDocumentRoot is:/Library/WebServer/DocumentsServer is accessible by:http://localhost/It is also pre-configured such that ~/Sites can be accessed by:http://localhost/~username/So with your regular user account you can just put your files in the Sites folder.