0
votes

I've just setup Zend2 skeleton application (on my Ubuntu 14.04 system) following step by step procedure. Once done and tried to access it from my Firefox browser BUT I'm getting 403 Forbidden error, like below.

Forbidden

You don't have permission to access / on this server.

Apache/2.4.7 (Ubuntu) Server at equilibrium-index.local Port 80

My vHost setup is like:

<VirtualHost *:80>
    ServerName general-index.local
 DocumentRoot /path/to/my/project/public
 SetEnv APPLICATION_ENV "dev"
 <Directory /path/to/myproject/public>
     DirectoryIndex index.php
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>  

Can anybody please suggest, where should I look at ??? because my fresh Zend2 application is not working.

Note:

  • all my directory have 755 and files have 644 permission
  • site enabled using a2ensite and apache restarted
  • mod rewrite is enabled

Solution My project was within /home/ritesh/my-projects/my-project

I create a symlink into my /var/www/html/my-project and I updated my vHost to point into /var/www/html/my-project/public (restart apache) and it magically works. Now I can see Zend Welcome screen.

1
Try the whole path to the public folder in the browser url. Eg: http://localhost/path/to/myproject/public and let us know the result. Then you can know if its actually the virtual host or something else need to be corrected. - Kunal Dethe
It didnot work mate. - Ritesh Aryal
Was it the same Forbidden error even when full path is used in url .....public/index.php? If yes, then at least we know that it has nothing to do with your virtual host. - Kunal Dethe

1 Answers

0
votes

Try with this :

<VirtualHost *:80>
    ServerName equilibrium-index.local
 DocumentRoot /path/to/my/project/public
 SetEnv APPLICATION_ENV "dev"
 <Directory /path/to/myproject/public>
     DirectoryIndex index.php
     Options +Indexes +FollowSymLinks +ExecCGI
     AllowOverride All
     Order allow,deny
     Allow from all
 </Directory>