0

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

Sultan

4 Answers 4

0

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.

6
  • Actually my virtualhosts are stored in my /home/www/hostsdirectory does it affect somehow?
    – sultan
    Commented 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
    Commented Nov 12, 2010 at 16:04
  • I've about 10 virtual hosts and requests on allof them give the same result
    – sultan
    Commented 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
    Commented 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
    Commented Nov 12, 2010 at 16:42
1

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

0

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

chmod 755 /home/www/hostdirestory
0

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .