Laravel/Homestead 403 forbidden Laravel/Homestead 403 forbidden nginx nginx

Laravel/Homestead 403 forbidden


Okay lads I have done figured it out. I was trying to access the root files of Laravel not the public folder which is not allowed in server environments. It was the folder hierarchy. Now that I think about it it makes sense. Simple error.

example (Hierarchy Error):

sites:    - map: homestead.app      to: ~/Code/Laravel/public

Laravel(Public folder container) -> public(Laravel proj. folder) -> Laravel project(root directory)

example (Correct hierarchy):

sites:    - map: homestead.app      to: ~/Code/Laravel(root directory of Laravel)/public(accesible folder)

Laravel(root directory) -> public(accessible folder not root)


Your folder might be wrong.

Open a terminal window in your project directory and enter

pwd

This prints the working directory, change the working directory in your yaml file.

Hope it helps. I am also new to Laravel.