Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/248.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 未找到nginx问题404上的Zend框架_Php_Zend Framework_Nginx - Fatal编程技术网

Php 未找到nginx问题404上的Zend框架

Php 未找到nginx问题404上的Zend框架,php,zend-framework,nginx,Php,Zend Framework,Nginx,我有一个使用Zend Framework v1和nginx的网站,运行在GNU/Linux Ubuntu 12.10 Quantal上。这是我在/etc/nginx/sites available/default的配置 upstream php-handler { #server 127.0.0.1:9000; server unix:/var/run/php5-fpm.sock; } server { listen 80; ## liste

我有一个使用Zend Framework v1和nginx的网站,运行在GNU/Linux Ubuntu 12.10 Quantal上。这是我在/etc/nginx/sites available/default的配置

upstream php-handler {
        #server 127.0.0.1:9000;
        server unix:/var/run/php5-fpm.sock;
}

server {
        listen   80; ## listen for ipv4; this line is default and implied
        #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

        #root /usr/share/nginx/www;
        root /var/www;
        index index.php index.html index.htm;

        # Make site accessible from http://localhost/
        server_name cloud.weduzedan.go.id;
        return 301 https://$server_name$request_uri;
}

# cloud.gemblung.co.id
server {
        listen 80;
        root /var/www/;
        index index.php index.html index.htm;
        server_name cloud.gemblung.co.id;
        location / {
                try_files $uri $uri/ /index.php?$args;
                if (!-f $request_filename) {
                        rewrite ^(.*)$ /index.php last;
                }
        }

        location ~ ^(.+?\.php)(/.*)?$ {
                try_files $uri = 404;

                include fastcgi_params;
                #fastcgi_param SCRIPT_FILENAME $document_root$1;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                fastcgi_param PATH_INFO $2;
                fastcgi_param HTTPS on;
                fastcgi_pass php-handler;
                fastcgi_intercept_errors on;
       }

}

日志中的错误为open()“/var/www404”失败(2:没有这样的文件或目录)。浏览器显示“404未找到”“。如何修复它?”

=404
必须没有空格。@AlexeyTen仍为空白页,未找到404,但日志中没有错误您尝试访问的地址是什么?它在我的本地服务器中。在apache中,它通常作为登录页面重定向到,正如我看到的,它将被重写为
/index.php
。您是否有文件
/var/www/index.php