zoukankan      html  css  js  c++  java
  • nginx 根据参数选择文档根目录

    server
      {
        listen       80;
        server_name  testmanage.h5.91wan.com;
        index index.html index.htm index.php;
    #char szArgs[URI_LEN + 1] = {0};
    #echo memcpy(szArgs, r->args.data, r->args.len);
    #$arg_a;

    set $website $arg_version;       
     root  /data/www/h5.91wan.com/$website;

        #limit_conn   crawler  20;

    #    location /nginx_status {
     #     stub_status on;
      #    access_log   off;
      #  }

        location ~ .*.(php|php5)?$
        {
          if ( $fastcgi_script_name ~ ..*/.*php ) {
           return 403;
          }
          #fastcgi_pass  unix:/tmp/php-cgi.sock;
          fastcgi_pass  127.0.0.1:9000;
          fastcgi_index index.php;
          include /usr/local/nginx/conf/fcgi.conf;
        }

        location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
        {
          expires      6h;
          #access_log /www/logs/img.chinaih.com.log;
        }
        location ~ .*.(js)?$
        {
          expires      5m;
        }
        location ~ .*.(css)?$
        {
          expires      1h;
        }

        access_log off;

       }

  • 相关阅读:
    java8 Stream排序字段为空排序方法
    SpringBoot使用token简单鉴权的具体实现方法
    性能调优
    TestNG最简单的测试
    TestNG异常测试
    TestNG中如何执行测试
    TestNG的基本注解
    TestNG介绍
    TestNG 环境搭建
    python第四课笔记
  • 原文地址:https://www.cnblogs.com/sandea/p/5039187.html
Copyright © 2011-2022 走看看