码迷,mamicode.com
首页 > 其他好文 > 详细

kohana nginx的配置

时间:2017-04-30 12:42:00      阅读:299      评论:0      收藏:0      [点我收藏+]

标签:roo   web   bmp   cat   ble   comm   listen   rewrite   fast   

kohana nginx的配置

                location / {
                        if (!-e $request_filename) {    
                                rewrite ^/(.*)$ /index.php?

kohana_uri=/$1 last; } index index.php index.html index.htm; }



普通配置:

server

        {

                listen 80;
                #listen [::]:80 default ipv6only=on;
                server_name honghuyule.com www.honghuyule.com;
                index index.html index.htm index.php;
                root  /data/htdcos/webroot;

                #error_page   404   /404.html;

                location ~ [^/]\.php(/|$)
                        {
                                # comment try_files $uri =404; to enable pathinfo
                                try_files $uri =404;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fastcgi.conf;
                                #include pathinfo.conf;
                        }


                location /nginx_status {
                        stub_status on;
                        access_log   off;
                }
                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }
                location ~ .*\.(js|css)?

$ { expires 12h; } access_log /data/wwwlogs/access.log access; }



kohana nginx的配置

标签:roo   web   bmp   cat   ble   comm   listen   rewrite   fast   

原文地址:http://www.cnblogs.com/brucemengbm/p/6788936.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!