zoukankan      html  css  js  c++  java
  • thinkphp5 下 的Nginx 伪静态


    server {

    listen 80;
    server_name all.bjed.com;
    root "F:wwwasdata";
    location / {
    index index.html index.htm index.php;
    #autoindex on;
        if (!-e $request_filename) {
            rewrite  ^(.*)$  /index.php?s=/$1  last;
            break;
        }
      }

    location ~ .php(.*)$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
    include fastcgi_params;
    }
    }

    thinkphp3
        server {
            ###SiteName  www.bc1.com
            listen       *:80;
            server_name  www.bc1.com;
            root         "F:/Visual-NMP-x64/www/BC1";
            #error_log    "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-error.log";
            #access_log   "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-access.log";
            autoindex    on;
            index        index.php index.html index.htm;
    
        location /
                {
                    index index.php;
                    #ThinkPHP REWRITE支持
                    if (!-e  $request_filename) {
                        rewrite ^/(.*)$ /index.php?s=$1 last;
                    }
                    #301 跳转设置
                    if ($host = 'vc.cn') {
                            rewrite ^/(.*) http://www.vc.cn/$1 permanent;
                    }
                
                }        
            location ~ [^/].php(/|$)
                {
                   fastcgi_split_path_info  ^(.+?.php)(/.*)$;
                    if (!-f $document_root$fastcgi_script_name) {
                            return 404;
                    }
                    fastcgi_pass   127.0.0.1:9002;
                    fastcgi_index  index.php;
                    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    fastcgi_param  PATH_INFO        $fastcgi_path_info;
                    fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
                    include        fastcgi_params;
                } 
        }
    
    
    
     
  • 相关阅读:
    HiveServer2的配置使用
    hBase-thrift 实践(java)
    Building Apache Thrift on CentOS 6.5
    linux安装thrift
    Apache Thrift with Java Quickstart(thrift入门及Java实例)
    [转载]/etc/security/limits.conf解释及应用
    storm 入门原理介绍
    Storm的wordCounter计数器详解
    CentOS6.5 安装python
    HBase 协处理器统计行数
  • 原文地址:https://www.cnblogs.com/wtcl/p/6484703.html
Copyright © 2011-2022 走看看