I inherited a Laravel project with the following directory structure. I believe it's a Laravel 4.0 project seeing that there's an app/storage
instead of a /storage
in the root directory like Laravel 5.0 projects
drwxrwx--- 19 loop staff 646 Nov 7 10:50 .
drwxr-xr-x 8 loop staff 272 Nov 7 10:07 ..
-rwxrwx---@ 1 loop staff 8196 Nov 7 10:49 .DS_Store
-rw-r--r-- 1 loop staff 323 Nov 7 10:44 .env
-rwxrwx--- 1 loop staff 373 Jun 11 18:24 .htaccess
drwxr-xr-x 9 loop staff 306 Nov 7 10:42 .idea
drwxrwx--- 14 loop staff 476 Nov 7 10:20 app
-rwxrwx--- 1 loop staff 2452 Nov 9 2014 artisan
drwxrwx--- 8 loop staff 272 Nov 7 10:06 bootstrap
-rwxrwx--- 1 loop staff 1189 Jul 8 13:33 composer.json
-rwxrwx--- 1 loop staff 66700 Jul 3 23:34 composer.lock
drwxrwx--- 6 loop staff 204 Nov 7 10:20 documentation
-rwxrwxrwx 1 loop staff 1580 Jun 10 14:53 index.php
-rwxrwx--- 1 loop staff 567 Nov 9 2014 phpunit.xml
drwxrwxr-x 7 loop staff 238 Nov 7 10:50 public
-rwxrwx--- 1 loop staff 2051 Nov 9 2014 readme.md
-rwxrwx--- 1 loop staff 519 Nov 9 2014 server.php
drwxrwx--- 4 loop staff 136 Nov 7 10:06 up-files
drwxrwx--- 24 loop staff 816 Jul 3 23:34 vendor
This is my Homestead.yaml file:
sites:
// other project mappings
- map: clear.app
to: /home/vagrant/Code/zfiles/public
After reloading my vagrant provision, I am met with the following error on my page:
So I went ahead and checked my error logs under /var/log/nginx/clear.app
2015/11/07 15:49:56 [crit] 794#0: *2 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.10.1, server: clear.app, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "clear.app"
2015/11/07 15:57:51 [error] 794#0: *8 directory index of "/home/vagrant/Code/zfiles/public/" is forbidden, client: 192.168.10.1, server: clear.app, request: "GET / HTTP/1.1", host: "clear.app"
I went ahead and changed my file directory permissions such as 755
for app/storage
. I also checked my nginx configs and this is the following:
listen 80;
server_name clear.app;
root "/home/vagrant/Code/zfiles/public";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
I tried a numerous "fixes" on StackOverflow and ServerFault, but no luck.