<![CDATA[Snooda]]> http://www.xiguqu.com/index zh-cn http://www.xiguqu.com/read/300 <![CDATA[wordpress在nginx中的rewrite重写规则]]> snooda <admin@snooda.com> Sun, 27 May 2012 04:02:32 +0000 http://www.xiguqu.com/read/300
    if (!-e $request_filename)
    {
       rewrite ^(.+)$ /index.php?q=$1 last;
    }

    看v来没什么错误,但实际用中d现静态文件也被rewriteCQ去nginx官网发现有了新参敎ͼ

    在location /D里加上一句:try_files $uri $uri/ /index.php?q=$uri&$args;


    ok了,L愉快?br/>


Tags - , ]]>
http://www.xiguqu.com/read/295 <![CDATA[为博客nginx日志dh域名打印Qhost字段Q及d其他域蟩转到d]]> snooda <admin@snooda.com> Thu, 17 May 2012 09:40:24 +0000 http://www.xiguqu.com/read/295
   U结的是nginx默认配置居然不打印请求的host域名Q无法考证之前爬虫爬取情况Q亡补牢,q怺nginx默认留空了日志第二个字段Q打印的是?”,正好用来打印域名Q将-修改?hostQ重启后打C?br/>

   对于已经收录的时域名,需要将量都导入到dQ在nginx里配|了一?01跌{Q?br/>
    if ($host = 'tmpdomain.com' )
    {  
        rewrite  ^/(.*)$  http://maindomain.com/$1  permanent;
    }



   ok
Tags - , ]]>
http://www.xiguqu.com/read/285 <![CDATA[nginx为js/css开启gzip压羃节省量]]> snooda <admin@snooda.com> Mon, 07 May 2012 06:26:28 +0000 http://www.xiguqu.com/read/285
    我明明在ngix配置文g里加了gzip  on;了,但ؓ啥js和css没有开呢,查了下nginx文档Q原来默认只对text/htmlcd的压~?br/>
    加了一句:gzip_types application/x-javascript text/css
    okQ现在js和css都压~了Q加载速度又提高了不少?br/>




Tags - ]]>
http://www.xiguqu.com/read/254 <![CDATA[nginx强制使用httpsQhttp到https自动跌{]]> snooda <admin@snooda.com> Sun, 11 Mar 2012 02:45:04 +0000 http://www.xiguqu.com/read/254     搜了一下,|上的一大抄们都表示rewrite (.*Qhttps://$host/$1 permanent;可以Q光目标地址没考虑端口号就让h感觉不是特别靠谱。试了下Q果然不行?br/>
    想了下,应该是在一开始就被判断出异常Q根本没有往后走的缘故?br/>
    q时扑ֈ一个方法:error_page 497 https://$host:$server_port$request_uri;
    497表示使用httpq接https的错误码。一旦出错让其蟩转到https?br/>    搞定
Tags - , , , , ]]>
seƬȫ,s8Ƶ ɫƵ,߾þò,³һ³,һɫɫԴվ һɫ,3XƵ <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <֩>| <ı> <ı> <ı> <ı> <ı> <ı>