Home  >  Q&A  >  body text

vagrant environment nginx 404

Access root directory 404

nginx error log

log2015/03/21 12:26:59 [crit] 2341#0: *54 stat() "/home/vagrant/wwwroot/tt.net/index.php" failed (13: Permission denied)

The file exists

bash[root@vagrant-centos65 conf]# cat /home/vagrant/wwwroot/tt.net/index.php
<?php
require __DIR__ . '/system/bootstrap.php';
...

Directory permissions 777

bash[root@vagrant-centos65 tt.net]# ls -la
total 48
drwxrwxrwx 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 .htaccess
drwxrwxrwx 1 vagrant vagrant  4096 Mar 21 12:04 .idea
-rwxrwxrwx 1 vagrant vagrant    49 Nov 20 17:32 index.php

What's the problem?

我想大声告诉你我想大声告诉你2712 days ago543

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 17:27:00

    Is the configuration user of Nginx vagrant? If not, set it to vagrant

    user vagrant.
    

    reply
    0
  • 怪我咯

    怪我咯2017-05-16 17:27:00

    Use root to see

    sudo nginx -s stop
    sudo nginx

    reply
    0
  • Cancelreply