I've been experiencing a problem with my virtual hosts, I don't understand why apache looks for /home/* directory if my virtualhosts' directory is somewhere else?

tail -f /var/log/apache2/error.log
/home/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable


4 Answers 4


It shouldn't. You must have this somewhere in your Apache configuration.

Or you have a softlink somewhere in your webdirectory/code to your home account.

  • Actually my virtualhosts are stored in my /home/www/hostsdirectory does it affect somehow?
    – sultan
    Nov 12, 2010 at 16:01
  • Well it seems that your webroot is then considered as /home/* as you said.. Apache by default looks in "every" directory for a .htaccess file.. You should probably look at you base document root in your httpd.conf file.. Also do you have any idea which vhosts is requesting your /home/.htaccess??
    – Arenstar
    Nov 12, 2010 at 16:04
  • I've about 10 virtual hosts and requests on allof them give the same result
    – sultan
    Nov 12, 2010 at 16:06
  • Very strange.. Make sure your vhosts are having the document root set properly /home/www/website.com/ And check your code.. your might be referencing.. ../../../../image.jpeg or /home/www/website.com/../../image.jpeg
    – Arenstar
    Nov 12, 2010 at 16:17
  • For sure I'd say this happens even if I setup some example.com with some "hello world" message within index file
    – sultan
    Nov 12, 2010 at 16:42

755 ist the answer, as all your files have to be readable by railo (which is actually not the same user as your Apache).


Try to chmod 755 /home/www then do the same with "hostdirectory"

chmod 755 /home/www/hostdirestory

Permissions on /home may not allow apache to read the directory appropriately.

The document root for the websites should be under /var/www or /srv/www. This allows you to have tight security on the home directory tree.

Specify the full DocumentRoot for your virtual servers.

Check that you haven't enabled user directories for your virtual servers. These will walk the /home tree.

  • The reason I keep all of my Virtual hosts at my home directory /home/sultan/Web/...
    – sultan
    Nov 13, 2010 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.