#PHP部分:
location ~ \.php {
	# 以下两行为避免,*.php文件不存在,而PHP-FPM(PHP FastCGI) 返回No input file specified错误,直接指向站点根目录下的404.html
	try_files $uri /www/lib/404/404.error.html;
	fastcgi_intercept_errors off;
	fastcgi_pass	127.0.0.1:9999;
	fastcgi_index	index.php;
	fastcgi_param	SCRIPT_FILENAME	$document_root$fastcgi_script_name;
	include			fastcgi_params;

	# 以下是为了让Nginx支持PATH_INFO
	set $path_info "";
	set $real_script_name $fastcgi_script_name;
	if($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
		set $real_script_name $1;
		set $path_info $2;
	}
	fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
	fastcgi_param SCRIPT_NAME $real_script_name;
	fastcgi_param PATH_INFO $path_info;

	fastcgi_connect_timeout	120;
	fastcgi_send_timeout	120;
	fastcgi_read_timeout	120;
	fastcgi_buffers			8 128K;
	fastcgi_buffer_size		128K;
}


#站点部分:
server {
	listen			80;
	server_name		asthis.net;
	root			/www/root/loga;
	charset			UTF-8;

	location / {
		if(-f $request_filename) {
			break;
		}
		if(!-e $request_filename){
			rewrite ^/(.*)$ /index.php/$1 last;
		}
		index	index.php;
	}
	include		php;
	include		error;
}

----------------------------------------------------------------------------

// 阿里云 nginx 伪静态规则
location / {
	if(!-e $request_filename){
		rewrite ^/(.*)$ /index.php?s=$1 last;
		break;
	}
}
