I just installed Laravel Homestead according to their instructions. When I open http://homestead.app:8000 I get the nginx 403 forbidden HTTP Response.
I have tried s
Change the config of Nginx
Put that line in 'location /' section:
try_files $uri $uri/public/index.php?$query_string;
If its not working then replace your 'public' with the folder name that content 'index.php',
That worked great with me using ServerPilot,
Good luck!.
Check nginx error in you vagrant box
"*1 FastCGI sent in stderr: "Unable to open primary script: /home/vagrant/code/public/index.php (No such file or directory)" "
Change in Homestead.yaml
to map: homestead.app to: /home/vagrant/code/Laravel/public
then..
Another reason for this response can be duplicating your routing with folders in public directory. For example you might have homestead.app/lists
GET
route and lists
folder in your /public
directory. This will cause the same 403 error (server will assume you are trying to access /public/lists
directory instead of your /lists
route).
I have been banging my head against the wall dealing with this very same problem, and I just solved it for my case.
I was sure I'd set up the yaml file correctly, but I kept getting the 403 error, and when experimenting with some routes I was getting "input file not specified".
My solution came from http://laravel.com/docs/4.2/homestead and it involved using the serve command. I wasn't adding any additional sites, just trying to anything to get the first site running.
SSH'ing into my vagrant box and using the command "serve my_app_name.app /home/vagrant/Code/path/to/public" did the job. Note that I had already put an entry into my hosts file for this app.
Hope this helps someone.
Access in your browser
homestead.app/public
Before installation of laravel/laravel with composer within /home/vagrant/Code/Laravel/public
I had the same problem and for me the cause was that in the Homestead.yaml file, I have incorrectly put this:
sites:
- map: homestead.app
to: /home/vagrant/Code
Instead of the correct syntax:
sites:
- map: homestead.app
to: /home/vagrant/Code/path/to/public