EDIT: Based on @Devons advice I ran the following commands with no errors (found in this post):
$ sudo find /var/public/www -type d -exec chmod 755 {} +
$ sudo find /var/public/www -type f -exec chmod 644 {} +
But when I list the files inside www the permissions still look wrong. What am I doing wrong? Thanks!
drwxrwx--- 1 root vboxsf 4096 Aug 28 12:45 app
-rwxrwx--- 1 root vboxsf 1646 Aug 28 12:45 artisan
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 bootstrap
-rwxrwx--- 1 root vboxsf 1201 Aug 28 12:45 composer.json
-rwxrwx--- 1 root vboxsf 105046 Aug 28 12:55 composer.lock
drwxrwx--- 1 root vboxsf 4096 Aug 28 12:45 config
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 database
-rwxrwx--- 1 root vboxsf 503 Aug 28 12:45 gulpfile.js
-rwxrwx--- 1 root vboxsf 159 Aug 28 12:45 package.json
-rwxrwx--- 1 root vboxsf 87 Aug 28 12:45 phpspec.yml
-rwxrwx--- 1 root vboxsf 899 Aug 28 12:45 phpunit.xml
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 public
-rwxrwx--- 1 root vboxsf 1928 Aug 28 12:45 readme.md
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 resources
-rwxrwx--- 1 root vboxsf 567 Aug 28 12:45 server.php
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 storage
drwxrwx--- 1 root vboxsf 0 Aug 28 12:45 tests
drwxrwx--- 1 root vboxsf 4096 Aug 28 12:56 vendor
This is my first time with nginx and cannot get laravel welcome page to show. I am using ubuntu 14.04 and VBox 5.
I have my server configured in /var/nginx/sites-enabled/default
as
server {
listen 80 default_server;
charset utf-8;
server_name doimain.app www.domain.app;
root /var/www/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Inside /var/www/public
I can list the laravel public folder files
$ ls -l /var/www/public
total 3
-rwxrwx--- 1 root vboxsf 0 Aug 28 12:45 favicon.ico
-rwxrwx--- 1 root vboxsf 1786 Aug 28 12:45 index.php
-rwxrwx--- 1 root vboxsf 24 Aug 28 12:45 robots.txt
But I get 404 when I go to domain.app
. The nginx error log shows:
2015/08/28 14:29:35 [crit] 1487#0: *14 stat() "/var/www/public/index.php" failed (13: Permission denied), client: 10.0.0.18, server: domain.app, request: "GET / HTTP/1.1", host: "domain.app"
I have tried without success the following:
Ensure www-data owns the folder structure /var/www
$ sudo chown www-data:www-data /var/www
Changed access rights to /var/www
$ sudo chmod -R 0755 /var/www
Thanks!