zoukankan      html  css  js  c++  java
  • thinkphp的nginx配置

    thinkphp的nginx配置

    server {
        listen       80;
        server_name  www.abc.com;
        #charset utf-8;
        access_log  /var/www/www.abc.com/log/host.access.log;
        error_log   /var/www/www.abc.com/log/error.log;
        # gzip off;
        root        /var/www/www.abc.com/web;
        index       index.php index.html index.htm;
        location / {
            if (!-e $request_filename) {
               rewrite  ^/(.*)$  /index.php/$1  last;
               break;
            }
        }
        location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ {
            expires 100d;
        }
        location ~ .*.(js|css)?$ {
            expires 30d;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ .php(/|$) {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            include        fastcgi.conf;
            set $fastcgi_script_name2 $fastcgi_script_name;
            if ($fastcgi_script_name ~ "^(.+.php)(/.+)$") {
                set $fastcgi_script_name2 $1;
                set $path_info $2;
            }
            fastcgi_param   PATH_INFO $path_info;
            fastcgi_param   SCRIPT_FILENAME   $document_root$fastcgi_script_name2;
            fastcgi_param   SCRIPT_NAME   $fastcgi_script_name2;
        }
    }
  • 相关阅读:
    P3444 [POI2006]ORK-Ploughing
    p4555&bzoj2565 最长双回文串
    bzoj2563 阿狸和桃子的游戏
    p4503&bzoj3555 企鹅QQ
    p3627&bzoj1179 抢掠计划(ATM)
    p2279&bzoj1217 消防局的设立
    p2661 信息传递(Tarjan模板)
    p2071 座位安排
    2B The least round way
    JSK 糟糕的bug
  • 原文地址:https://www.cnblogs.com/CHEUNGKAMING/p/5706404.html
Copyright © 2011-2022 走看看