zoukankan      html  css  js  c++  java
  • nginx 配置文件配置

    server {
        listen       80 ;
        server_name  test.com www.test.com;
            index index.html index.php index.htm;
            root /alidata/www/test/public/;
    
            if ( $query_string ~* ".*[;'<>].*" ){
                return 404;
            }
    
    
                return 404;
            }
    
    
        location  / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        if (!-f $request_filename){
             rewrite ^/(.+)$ /index.php?$1& last;
        }
    
    
            location ~ .*.(php|php5)?$
            {
              if ( $host != 'test.com' ) {
                rewrite ^/(.*)$ http://test.com permanent;
            }
    
                    fastcgi_pass  127.0.0.1:9000;
                    fastcgi_index index.php;
                    include fastcgi.conf;
            }
            location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
            {
                    expires 30d;
            }
            location ~ .*.(js|css)?$
            {
                    expires 1h;
            }
            access_log  /alidata/log/nginx/access/default.log;
    }
    

      

  • 相关阅读:
    CF359B Permutation
    CF859C Pie Rules
    Contest 156
    Contest 155
    Range Module
    python-环境
    Git 使用
    Contest 154
    生命是一种长期而持续的累积过程
    Contest 153
  • 原文地址:https://www.cnblogs.com/freespider/p/5199271.html
Copyright © 2011-2022 走看看