码迷,mamicode.com
首页 > 其他好文 > 详细

WordPress在nginx服务器伪静态

时间:2015-02-13 14:46:50      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:

 server {
	listen 80;
	root /var/www/xxx;
	server_name www.xxx.com;
	access_log /var/log/www/xxx.log main;
	error_log /var/log/www/xxx_error.log;
 
	
	
	location / {
		root /var/www/xxx;
		index index.php index.html index.htm;
		
	if (-f $request_filename/index.html){
			rewrite (.*) $1/index.html break;
	}


	if (-f $request_filename/index.php){
		rewrite (.*) $1/index.php;
	}


	if (!-f $request_filename){
			rewrite (.*) /index.php;
	}
	 	
		
		
	}
		error_page 500 502 503 504 /50x.html;
		location = /50x.html {
		root /var/www/xxx;
	}
	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
	location ~ \.php$ {
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME /var/www/xxx/$fastcgi_script_name;
		include fastcgi_params;
	}
	location ~ /\.ht {
		deny all;
	}
}

  

WordPress在nginx服务器伪静态

标签:

原文地址:http://www.cnblogs.com/liscookie/p/4290161.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!