没有找到关于nginx问题404的Zend Framework

时间:2014-06-17 04:34:22

标签: php zend-framework nginx

我有一个使用Zend Framework v1和nginx在GNU / Linux Ubuntu 12.10 Quantal上运行的Web。这是我在/ 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 not found“。如何解决? 。

0 个答案:

没有答案