nginx+php 访问PHP文件404 56错误

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
zombee
帖子: 7
注册时间: 2008-10-22 22:42

nginx+php 访问PHP文件404 56错误

#1

帖子 zombee » 2010-11-04 12:13

之前还用得好好的,现在突然出现404错误,其他的html页面都可以访问正常,但是php文件不行,求助!!!!
附:配置

代码: 全选

server {
	listen   80;
	#listen   somename:8080;
	server_name  q.c;
	#root   /var/www/q_c/;
	#index  index.html;
	access_log  /var/log/nginx/q_c.access.log;
	error_log /var/log/nginx/q_c.error.log;
	location / {
		root   /var/www/q_c/;
		index index.php index.html;
		#try_files $uri $uri/ /index.html;
	}
	###	REWRITE START
	rewrite ^/member/([0-9]+)(\??)(.*)$ /index.php?mod=member&method=index&uid=$1&$3 break;	#member.index()
	rewrite ^/tag/([a-zA-Z%]+)(\??)(.*)$ /index.php?mod=tag&method=index&tagname=$1&$3 break;	#tag.index()
	###	REWRITE END
	location ~ .php$ {
	    fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  /var/www/q_c/$fastcgi_script_name;
	    fastcgi_param SCRIPT_FILENAME /var/www/q_c/$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;
	    fastcgi_ignore_client_abort off;
		fastcgi_connect_timeout 60;
		fastcgi_send_timeout	180;
		fastcgi_read_timeout	180;
		fastcgi_buffer_size 128k;
		fastcgi_buffers 4 256k;
		fastcgi_busy_buffers_size 256k;
		fastcgi_temp_file_write_size 256k;
	  }
}
zombee
帖子: 7
注册时间: 2008-10-22 22:42

Re: nginx+php 访问PHP文件404 56错误

#2

帖子 zombee » 2010-11-04 12:15

求助求助啊!
tonyzhou
帖子: 20
注册时间: 2008-07-09 16:42

Re: nginx+php 访问PHP文件404 56错误

#3

帖子 tonyzhou » 2010-11-05 21:51

你确认你的php-cgi/php-fpm还在跑?在的话确认是在900监听并且不是僵尸?

如果是用php-cgi的话看我的blog吧:https://tomem.info/blog/2010/07/393
php-cgi太容易自己卡死了
我的blog:https://tomem.info
回复