zoukankan      html  css  js  c++  java
  • Yiiframework pathinfo 模式下nginx设置

    server {
        listen       80;
        server_name  www.rmd.com;
        root           D:/Workspace/php/sites/training-cn/rmd;
        set $index   "index.php";
        charset utf-8;
    
        location / {
            index  index.html $index;
            try_files $uri $uri/ /$index?$args;
        }
    
        location ~ ^/(protected|framework|themes/w+/views) {
            deny  all;
        }
    
        location ~ .(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
            try_files $uri =404;
        }
    
        location ~ .php {
    
            fastcgi_split_path_info  ^(.+.php)(.*)$;
    
            set $fsn /$index;
            if (-f $document_root$fastcgi_script_name){
                set $fsn $fastcgi_script_name;
            }
    
            fastcgi_pass   127.0.0.1:9000;
            include fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME   $document_root$fsn;
            fastcgi_param  PATH_INFO        $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fsn;
        }
    
        location ~ /.ht {
            deny  all;
        }
    
    }
  • 相关阅读:
    奇偶数排序
    买房子
    首字母大写
    学分绩点
    加减乘除
    最简真分数
    Hdu 1058 Humble Numbers
    Hdu 1032 The 3n + 1 problem
    Hdu 1040 As Easy As A+B
    Hdu 1025 Constructing Roads In JGShining's Kingdom
  • 原文地址:https://www.cnblogs.com/luowen/p/4386395.html
Copyright © 2011-2022 走看看