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;
                } 
        }
    
    
    
     
  • 相关阅读:
    ajax-分页查询
    Bootstrap-响应式表格
    ajax-三级联动
    ajax(加载数据)
    HDU 3086 马拉车模板
    Power Strings POJ2406 KMP 求最小循环节
    KMP模板题 Number Sequence HDU1711
    Phone List HDU1671 字典树Trie
    一些linux"基本操作"的教程汇总
    Codeforces 899F Letters Removing 线段树/树状数组
  • 原文地址:https://www.cnblogs.com/wtcl/p/6484703.html
Copyright © 2011-2022 走看看