I've seen this question posted before, but no one has a working answer.
The problem: I want to put a website on a DIFFERENT drive/directory - NOT the default Apache configuration that forces you to always use the drive the OS is installed in (which is a bad practice).
- I've created the structure
/mnt/Apps/WEBSITES/mywebsite/webroot/which is located on another volume. - I've created a simple
index.htmlfile - I've created a virtual website on Apache pointing to the path above
- I've chmod'd the permissions to 775 using -R for the WEBSITES directory
I've attempted the chcon command to change the security context :
chcon -Rv --type=httpd_sys_content_t /mnt/Apps/WEBSITESIt applied the security contexts with no errors.
- I've verified the security contexts with the ls -Z command - all is good.
I've verified Read and Execute on the directories and on the
index.htmlfile.I've rebooted Apache and still get the following error: Forbidden You don't have permission to access /index.html on this server.
So far a day and a half of reading books & posts, tweaking, testing, trying every fix I can think of and I still get this dreaded 403 error.
The
httpd.conffile looks fine to me (the virtual server and path are correct)I'm running Apache version 2.2.15 on CentOS 6.3 (fully updated as of this afternoon).
I'm stumped (yes, I'm a noob too - I was forced into Linux from Win/Mac environment & I'm expected to figure it out in a week - ugh!).
# namei -om /mnt/Apps/WEBSITES)serverfault.com/questions/474201/… – Martino Dino Feb 16 at 4:20setenforce permissive. You will fix Selinux related issues later. – Martino Dino Feb 16 at 4:24