Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.html file
  • 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/WEBSITES

  • It 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.html file.

  • 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.conf file 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!).

share|improve this question
    
Error log says...? –  Ignacio Vazquez-Abrams Feb 16 '13 at 3:48
    
Check the permissions on every directory in that complete path. –  Michael Hampton Feb 16 '13 at 4:05
    
Maybe this will help you in looking at issues in the path (# namei -om /mnt/Apps/WEBSITES)serverfault.com/questions/474201/… –  Martino Dino Feb 16 '13 at 4:20
    
And if you're a noob then disable SELINUX for now... setenforce permissive. You will fix Selinux related issues later. –  Martino Dino Feb 16 '13 at 4:24
    
No default directory index page is present. Upload Index.html or Index.htm file. Directive DirectoryIndex defines the default index page name. Open your apache configuration file, find out default index file name, and upload the same file to directory: DirectoryIndex index.html index.php. –  Abhishek Anand Amralkar Feb 16 '13 at 5:49
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.