Nginx经常返回404

我在Ubuntu 14.04中有一个Nginx 1.4的服务器,它运行的是PHP5-fpm。 服务器在私有云服务器中有多个域和子域。 服务器从stream量中获得一致的点击量并且很多。 一切都很好,但Nginx经常返回404,而事实上并没有在实际的情况下,尝试之后,它返回的实际输出,而不是404。下面是我的一个从nginxconfiguration的服务器块的一个例子。

server { listen 80; #listen [::]:80; root /var/www/appfolder; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name domain-name; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests #location /RequestDenied { # proxy_pass http://127.0.0.1:8080; #} error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/appfolder; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # # # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } 

请帮助我,我已经搜查了很多,但从来没有得到一个妥善的解决scheme。 提前致谢