2

I have the exactly same problem as in 403 Forbidden Error when accessing enabled virtual host, but I tried the provided solution and still receiving 403 Forbidden, my site is called project, and it's cofiguration file in /etc/apache2/sites-available is the following:

<VirtualHost *:80>
ServerAdmin webmaster@reweb
ServerName www.online.project.com
ErrorLog /logs/project-errors.log

DocumentRoot /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar/public
<Directory /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar>
    Order Deny,Allow
    Allow from all
    Options Indexes
</Directory>

Tried to change the owner of /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.cobico.com.ar to www:data:www-data with recursion, but still getting this error in project-errors.log:

[Mon Jan 31 01:26:01 2011] [crit] [client 127.0.0.1] (13)Permission denied: /home/joarobles/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Any idea? Thanks!

  • I'm a bit confused because the owner of "/var/www" is root, shouldn't it be "apache" or something like that? – Joaquín L. Robles Jan 31 '11 at 04:34
  • What are the full permissions of /var/www and /home/joarobles/.htaccess ? Can you do an ls -ld of both? Something like drwxr-xr-x 2 root root 4096 is OK for /var/www because the www-data user still has read access, which it needs to display content. – belacqua Jan 31 '11 at 06:27
  • @Joaquin by default it uses root from the default install. you'd need to modify the system's files to use a different user/group. – Thomas Ward Jul 11 '11 at 13:09
  • It's root because the webserver does not always have to write to it, static files or scripts which do not need to modify files. – Lekensteyn Aug 19 '11 at 10:44
  • Here is a similar post http://askubuntu.com/questions/2835/403-forbidden-error-when-accessing-enabled-virtual-host/14370#14370 – aneeshep Oct 19 '11 at 07:00
  • Here is a similar post : http://askubuntu.com/questions/2835/403-forbidden-error-when-accessing-enabled-virtual-host/14370#14370 – aneeshep Oct 19 '11 at 07:01

2 Answers2

4

You need to have Read and Execute permissions on your home folder. If you do sudo chmod o+rx /home/joarobles This error should then be resolved.

Marco Ceppi
  • 48,101
1

Try to insert <directory /> tags before your <directory> tags of your web root.

...
DocumentRoot /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar/public
    <Directory />
       Options FollowSymLinks
       AllowOverride None
    </Directory>
<Directory /home/joarobles/Zend/workspaces/DefaultWorkspace7/online.project.com.ar>
 ...

It might help.

mazao
  • 11
  • 1