问题描述
访问根目录 404
nginx 错误日志
log2015/03/21 12:26:59 [crit] 2341#0: *54 stat() '/home/vagrant/wwwroot/tt.net/index.php' failed (13: Permission denied)
文件是存在的
bash[root@vagrant-centos65 conf]# cat /home/vagrant/wwwroot/tt.net/index.php<?phprequire __DIR__ . ’/system/bootstrap.php’;...
目录权限777
bash[root@vagrant-centos65 tt.net]# ls -latotal 48drwxrwxrwx 1 vagrant vagrant 4096 Mar 21 12:04 .drwxrwxrwx 1 vagrant vagrant 4096 Mar 21 12:04 ..drwxrwxrwx 1 vagrant vagrant 4096 Mar 21 12:08 .git-rwxrwxrwx 1 vagrant vagrant 316 Nov 20 17:15 .gitignore-rwxrwxrwx 1 vagrant vagrant 169 Oct 31 16:27 .htaccessdrwxrwxrwx 1 vagrant vagrant 4096 Mar 21 12:04 .idea-rwxrwxrwx 1 vagrant vagrant 49 Nov 20 17:32 index.php
这是啥问题?
问题解答
回答1:Nginx的配置用户是vagrant吗?如果不是,请设置为vagrant
user vagrant.回答2:
用root看看
sudo nginx -s stopsudo nginx