zoukankan      html  css  js  c++  java
  • WordPress在nginx服务器伪静态

     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;
    	}
    }
    

      

  • 相关阅读:
    Grandpa's Estate
    The Fortified Forest
    Scrambled Polygon
    Wall
    激情的大三
    无聊的大二
    美好的大一
    高精度 加减乘
    Erasing Edges
    git放弃修改&放弃增加文件
  • 原文地址:https://www.cnblogs.com/liscookie/p/4290161.html
Copyright © 2011-2022 走看看