I am trying to deploy my Laravel app in apache2 locally, however when trying to browse to http://myapp.localhost.com/ I am getting the following error:
Forbidden
You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at myapp.localhost.com Port 80
I created myapp.conf in /etc/apache2/sites-available to set up the virtual host:
<VirtualHost *:80>
ServerName myapp.localhost.com
DocumentRoot "/home/user/projects/myapp/public"
<Directory "/home/user/projects/myapp/public">
AllowOverride all
</Directory>
</VirtualHost>
And created a symlink in /etc/apache2/sites-enabled (sudo ln -s ../sites-available/myapp.conf)
Also edited the /etc/hosts file and added:
127.0.0.1 myapp.localhost.com
Any clue why I am getting this error? I am also having the same problem when trying to deploy the application to heroku, which also uses apache2.