Nginx显示404而不是php页面


Nginx showing 404 instead of php page

我安装了nginx,如果我转到uberdrivengparttime.app/我会看到通常的"欢迎使用nginx!"屏幕。我用phpinfo()在文件夹中放了一个index.php;当我访问uberdrivengparttime.app/index.php时,我得到了404!这是配置中的服务器blcok。希望有人知道发生了什么!

server {
    listen   80;
    server_name www.uberdrivingparttime.com uberdrivingparttime.com;
    access_log /srv/www/uberdrivingparttime.com/logs/access.log;
    error_log /srv/www/uberdrivingparttime.com/logs/error.log;
    location / {
        root   /srv/www/uberdrivingparttime.com/public_html;
        index  index.html index.htm index.php;
    }
    location ~ '.php$ {
        include /etc/nginx/fastcgi_params;
        #fastcgi_pass 127.0.0.1:9000;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /srv/www/uberdrivingparttime.com/public_html$fastcgi_script_name;
    }
}

我是个疲惫、愚蠢、白痴。

所以,这里一切都很好,除了在/etc/hosts中我有.app。文件所在的目录是.com!将服务器线路切换到.app解决了所有问题。

哇。