Laravel Homestead: 403 forbidden on nginx Laravel Homestead: 403 forbidden on nginx nginx nginx

Laravel Homestead: 403 forbidden on nginx


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


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.