<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>了然的天空</title>
	<atom:link href="http://liaoran.blog.35.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://liaoran.blog.35.cn</link>
	<description></description>
	<pubDate>Thu, 10 Sep 2009 14:42:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>推荐一些ubuntu的书</title>
		<link>http://liaoran.blog.35.cn/2009/09/10/tuijianyixieubuntudeshu/</link>
		<comments>http://liaoran.blog.35.cn/2009/09/10/tuijianyixieubuntudeshu/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 14:42:08 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/?p=13</guid>
		<description><![CDATA[Ubuntu Linux入门到精通

Ubuntu Linux指南：基础篇

Ubuntu Linux指南：管理篇

完美应用Ubuntu

Ubuntu Server最佳方案

Linux系统管理技术手册（中文第二版）
]]></description>
			<content:encoded><![CDATA[<p><a href="http://book.51cto.com/art/200706/49518.htm">Ubuntu Linux入门到精通</a><br />
<br />
<a href="http://book.51cto.com/art/200905/122771.htm">Ubuntu Linux指南：基础篇</a><br />
<br />
<a href="http://book.51cto.com/art/200905/125685.htm">Ubuntu Linux指南：管理篇</a><br />
<br />
<a href="http://book.51cto.com/art/200808/85158.htm">完美应用Ubuntu</a><br />
<br />
<a href="http://book.51cto.com/art/200906/127309.htm">Ubuntu Server最佳方案</a><br />
<br />
<a href="http://book.51cto.com/art/200804/69727.htm">Linux系统管理技术手册（中文第二版）</a></p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/09/10/tuijianyixieubuntudeshu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>让NGINX后端的APACHE能获取到真实IP</title>
		<link>http://liaoran.blog.35.cn/2009/08/03/rangnginxhouduandeapachenenghuoqudaozhenshiip/</link>
		<comments>http://liaoran.blog.35.cn/2009/08/03/rangnginxhouduandeapachenenghuoqudaozhenshiip/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 14:10:38 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/?p=11</guid>
		<description><![CDATA[本网刚上线，发现DISUCZ的访问者在线列表，所有访问者的IP都是127.0.0.1。
想到问题所在，因为本网站最前端是NGINX，做的PROXY来转发请求到内部的apache上，所以获取的IP都是NGINX PROXY CILLENT IP。
查了一下资料，只需要修改NGINX的配置文件NGINX.CONF，在里面加上
proxy_set_header        Host $host;
proxy_set_header        X-Real-IP $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
这只是仅针对NGINX和APACHE在同一台服务器上，问题解决。
如果NGINX和APACHE不在同一台服务器上，需要如下方式：
apache这一个来自第三方的mod 配合Nginx proxy 使用。
说明：http://stderr.net/apache/rpaf/
下载：http://stderr.net/apache/rpaf/download/
最新版本是 mod_rpaf-0.6.tar.gz
安装也相当简单。
# tar zxvf mod_rpaf-0.6.tar.gz   下载后解压
# cd mod_rpaf-0.6
Apache 的目录按自己的环境修改，并选择相应的安装方式：
#/usr/local/apache/bin/apxs -i -a -c mod_rpaf.c    Apache 1.3.x 的安装方式
#/usr/local/apache/bin/apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c   Apache 2.x 的安装方式
完成后会在 http.conf  的 LoadModule 区域 为你多加了一行。
LoadModule mod_rpaf-2.0.so_module modules/mod_rpaf-2.0.so
经 apache 2.2.6 的实验，使用这一行启动 apache 的时候会报错的。
所以改为：
LoadModule rpaf_module        modules/mod_rpaf-2.0.so
并在下方添加
RPAFenable On
RPAFsethostname [...]]]></description>
			<content:encoded><![CDATA[<p>本网刚上线，发现DISUCZ的访问者在线列表，所有访问者的IP都是127.0.0.1。<br />
想到问题所在，因为本网站最前端是NGINX，做的PROXY来转发请求到内部的apache上，所以获取的IP都是NGINX PROXY CILLENT IP。<br />
查了一下资料，只需要修改NGINX的配置文件NGINX.CONF，在里面加上<br />
proxy_set_header        Host $host;<br />
proxy_set_header        X-Real-IP $remote_addr;<br />
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;</p>
<p>这只是仅针对NGINX和APACHE在同一台服务器上，问题解决。<br />
如果NGINX和APACHE不在同一台服务器上，需要如下方式：</p>
<p>apache这一个来自第三方的mod 配合Nginx proxy 使用。<br />
说明：<a href="http://stderr.net/apache/rpaf/" target="_blank"><span style="color: #0000ff">http://stderr.net/apache/rpaf/</span></a><br />
下载：<a href="http://stderr.net/apache/rpaf/download/" target="_blank"><span style="color: #810081">http://stderr.net/apache/rpaf/download/</span></a><br />
最新版本是 mod_rpaf-0.6.tar.gz<br />
安装也相当简单。<br />
# tar zxvf mod_rpaf-0.6.tar.gz   下载后解压<br />
# cd mod_rpaf-0.6<br />
Apache 的目录按自己的环境修改，并选择相应的安装方式：<br />
<span style="font-size: 13px">#/usr/local/apache/bin/apxs -i -a -c mod_rpaf.c    A<span style="font-size: 13px">pache 1.3.x 的安装方式</span></span><br />
<span style="font-size: 13px"><span style="font-size: 13px">#/usr/local/apache/bin/apxs</span> -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c   A<span style="font-size: 13px">pache 2.x 的安装方式</span></span><br />
完成后会在 http.conf  的 LoadModule 区域 为你多加了一行。<br />
LoadModule mod_rpaf-2.0.so_module modules/mod_rpaf-2.0.so</p>
<p>经 apache 2.2.6 的实验，使用这一行启动 apache 的时候会报错的。<br />
所以改为：<br />
LoadModule rpaf_module        modules/mod_rpaf-2.0.so<br />
并在下方添加<br />
RPAFenable On<br />
RPAFsethostname On<br />
RPAFproxy_ips 127.0.0.1 192.168.10.2    # 填写Nginx所在的内网IP。<br />
RPAFheader X-Forwarded-For<br />
保存退出后重启apache</p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/08/03/rangnginxhouduandeapachenenghuoqudaozhenshiip/feed/</wfw:commentRss>
		</item>
		<item>
		<title>关于apache目录重定向的例子</title>
		<link>http://liaoran.blog.35.cn/2009/07/17/guanyuapachemuluzhongdingxiangdelizi/</link>
		<comments>http://liaoran.blog.35.cn/2009/07/17/guanyuapachemuluzhongdingxiangdelizi/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 08:30:34 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/?p=6</guid>
		<description><![CDATA[如果.htaccess开启，可以在各目录里放置该规则实规重定向，不过apache独立主机开启.htaccess后将极大的延迟响应速度和cpu性能，最好不要开启

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://bbs.08163.com/$1 [L,R=301]

如果.htaccess未开启，可以在httpd.conf的站点目录配置中添加以下规则

RedirectMatch 301 ^/zhe[/]?(.*)$ http://zhe.08163.com/$1
RedirectMatch 301 ^/bbs[/]?(.*)$ http://bbs.08163.com/$1
RedirectMatch 301 ^/channel[/]?(.*)$ http://channel.08163.com/$1

大家可以测试一下http://www.08163.com/mall/index.php
]]></description>
			<content:encoded><![CDATA[<p>如果.htaccess开启，可以在各目录里放置该规则实规重定向，不过apache独立主机开启.htaccess后将极大的延迟响应速度和cpu性能，最好不要开启<br />
<code><br />
Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule ^(.*)$ http://bbs.08163.com/$1 [L,R=301]<br />
</code></p>
<p>如果.htaccess未开启，可以在httpd.conf的站点目录配置中添加以下规则<br />
<code><br />
RedirectMatch 301 ^/zhe[/]?(.*)$ http://zhe.08163.com/$1<br />
RedirectMatch 301 ^/bbs[/]?(.*)$ http://bbs.08163.com/$1<br />
RedirectMatch 301 ^/channel[/]?(.*)$ http://channel.08163.com/$1<br />
</code></p>
<p>大家可以测试一下<a href="http://www.08163.com/mall/index.php" target="_blank">http://www.08163.com/mall/index.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/07/17/guanyuapachemuluzhongdingxiangdelizi/feed/</wfw:commentRss>
		</item>
		<item>
		<title>discuz/uchome等生成指定条数的列表简隔</title>
		<link>http://liaoran.blog.35.cn/2009/05/31/discuzuchome%e7%ad%89%e7%94%9f%e6%88%90%e6%8c%87%e5%ae%9a%e6%9d%a1%e6%95%b0%e7%9a%84%e5%88%97%e8%a1%a8%e7%ae%80%e9%9a%94/</link>
		<comments>http://liaoran.blog.35.cn/2009/05/31/discuzuchome%e7%ad%89%e7%94%9f%e6%88%90%e6%8c%87%e5%ae%9a%e6%9d%a1%e6%95%b0%e7%9a%84%e5%88%97%e8%a1%a8%e7%ae%80%e9%9a%94/#comments</comments>
		<pubDate>Sun, 31 May 2009 04:34:44 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/2009/05/31/discuzuchome%e7%ad%89%e7%94%9f%e6%88%90%e6%8c%87%e5%ae%9a%e6%9d%a1%e6%95%b0%e7%9a%84%e5%88%97%e8%a1%a8%e7%ae%80%e9%9a%94/</guid>
		<description><![CDATA[
    
 
$value[subject]

    
   

  

]]></description>
			<content:encoded><![CDATA[<p><code><br />
 <!--{eval $i = 1}-->   <!--设置变量$i的值等于1--><br />
 <!--{loop $_SBLOCK['调用的变量名'] $value}--></p>
<li><a href="$value[url]?PHPSESSID=94b27b69cbdc5e84725ff432307d764b">$value[subject]</a></li>
<p><!--打印新闻出来--><br />
<!--{if ($i % 5) == 0}-->  <!-- 当I能除尽5的时候就写入一个HR 线. 意思就是每五个新闻下面整条线出来 -->  </p>
<hr />   <br />
<!--{/if}--><br />
<!--{eval $i++}-->  <!--每跑一次LOOP(循环)变量I就自己给自己加上一个1.--><br />
<!--{/loop}--></code></p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/05/31/discuzuchome%e7%ad%89%e7%94%9f%e6%88%90%e6%8c%87%e5%ae%9a%e6%9d%a1%e6%95%b0%e7%9a%84%e5%88%97%e8%a1%a8%e7%ae%80%e9%9a%94/feed/</wfw:commentRss>
		</item>
		<item>
		<title>php虚拟主机301重定向的方法</title>
		<link>http://liaoran.blog.35.cn/2009/04/30/phpxunizhuji301zhongdingxiangdefangfa/</link>
		<comments>http://liaoran.blog.35.cn/2009/04/30/phpxunizhuji301zhongdingxiangdefangfa/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 19:18:06 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/?p=4</guid>
		<description><![CDATA[1，如果你是Linux主机，请看此文：更改域名后301重定向Wordpress固定链接
2，如果你很不幸跟我一样是windows主机的话，那么Follow Me
找到wordpress根目录下的wp-blog-header.php，并在文件开头 &#60;?php 之后加入以下代码：
if (strtolower($_SERVER['SERVER_NAME'])!=’www.leinky.com’)
{
  $URIRedirect=$_SERVER['REQUEST_URI'];
  if(strtolower($URIRedirect)=="/index.php")
  {
     $URIRedirect="/";
  }
  header(’HTTP/1.1 301 Moved Permanently’);
  header(’Location:http://www.leinky.com’.$URIRedirect);
  exit();
}
把其中的网址换成你的新网址。ok，就是这么简单。嘿嘿，如果你有任何编程方面或者Word/Excel方面的问题，也可以找Estyle兄帮你。。。
]]></description>
			<content:encoded><![CDATA[<p>1，如果你是Linux主机，请看此文：更改域名后301重定向Wordpress固定链接</p>
<p>2，如果你很不幸跟我一样是windows主机的话，那么Follow Me<br />
找到wordpress根目录下的wp-blog-header.php，并在文件开头 &lt;?php 之后加入以下代码：</p>
<p>if (strtolower($_SERVER['SERVER_NAME'])!=’www.leinky.com’)<br />
{<br />
  $URIRedirect=$_SERVER['REQUEST_URI'];<br />
  if(strtolower($URIRedirect)=="/index.php")<br />
  {<br />
     $URIRedirect="/";<br />
  }<br />
  header(’HTTP/1.1 301 Moved Permanently’);<br />
  header(’Location:http://www.leinky.com’.$URIRedirect);<br />
  exit();<br />
}</p>
<p>把其中的网址换成你的新网址。ok，就是这么简单。嘿嘿，如果你有任何编程方面或者Word/Excel方面的问题，也可以找Estyle兄帮你。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/04/30/phpxunizhuji301zhongdingxiangdefangfa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>不易被拦截的弹出窗口代码</title>
		<link>http://liaoran.blog.35.cn/2009/04/30/%e4%b8%8d%e6%98%93%e8%a2%ab%e6%8b%a6%e6%88%aa%e7%9a%84%e5%bc%b9%e5%87%ba%e7%aa%97%e5%8f%a3%e4%bb%a3%e7%a0%81/</link>
		<comments>http://liaoran.blog.35.cn/2009/04/30/%e4%b8%8d%e6%98%93%e8%a2%ab%e6%8b%a6%e6%88%aa%e7%9a%84%e5%bc%b9%e5%87%ba%e7%aa%97%e5%8f%a3%e4%bb%a3%e7%a0%81/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:55:20 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://liaoran.blog.35.cn/2009/04/30/%e4%b8%8d%e6%98%93%e8%a2%ab%e6%8b%a6%e6%88%aa%e7%9a%84%e5%bc%b9%e5%87%ba%e7%aa%97%e5%8f%a3%e4%bb%a3%e7%a0%81/</guid>
		<description><![CDATA[最近需要一个不被屏蔽的弹出窗口代码，至少也得是不易被拦截的弹出窗口代码，找了好久，发现淘宝网的弹出广告做得比较人性化，不会令人很反感。搜索一番，摘录备用：
淘宝网的JS弹出窗口代码采用了Cookies，24小时内只弹出一次窗口，但并不是打开网页就直接弹出，是用JS控制链接a标签，点击网页中任意一个超级链接就会弹出广告窗口。
测试弹出窗口代码如下：
//写入COOKIE
function setCookie(name,value){
  var Days = 1;
  var exp = new Date();
  exp.setTime(exp.getTime() + Days*24*60*60*1000);
  document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
  }
//读取COOKIE
function getCookie(name){
  var arr,reg=new RegExp("(^&#124; )"+name+"=([^;]*)(;&#124;$)");
  if(arr=document.cookie.match(reg)) return unescape(arr[2]);
  else return null;
  }
window.attachEvent("onload", function(){
  if (getCookie("popWin")) return false;
  var [...]]]></description>
			<content:encoded><![CDATA[<p>最近需要一个不被屏蔽的弹出窗口代码，至少也得是不易被拦截的弹出窗口代码，找了好久，发现淘宝网的弹出广告做得比较人性化，不会令人很反感。搜索一番，摘录备用：</p>
<p>淘宝网的JS弹出窗口代码采用了Cookies，24小时内只弹出一次窗口，但并不是打开网页就直接弹出，是用JS控制链接a标签，点击网页中任意一个超级链接就会弹出广告窗口。</p>
<p>测试弹出窗口代码如下：</p>
<p>//写入COOKIE<br />
function setCookie(name,value){<br />
  var Days = 1;<br />
  var exp = new Date();<br />
  exp.setTime(exp.getTime() + Days*24*60*60*1000);<br />
  document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();<br />
  }</p>
<p>//读取COOKIE<br />
function getCookie(name){<br />
  var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");<br />
  if(arr=document.cookie.match(reg)) return unescape(arr[2]);<br />
  else return null;<br />
  }</p>
<p>window.attachEvent("onload", function(){<br />
  if (getCookie("popWin")) return false;<br />
  var o = document.getElementsByTagName("a");<br />
  for (var i=0; i&lt;o.length; i++){<br />
    o[i].attachEvent("onclick", function(){<br />
      if (!getCookie("popWin")){<br />
        setCookie("popWin", "true");<br />
        window.open("http://blog.fufuok.com/", "popWin", "toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes");<br />
        window.focus();<br />
        }<br />
      });<br />
    }<br />
  });</p>
<p><a href="#">点击链接弹出窗口</a></p>
<p>也可以设置弹出窗口的大小和位置，没IE6，没测试过，IE7等选项卡浏览器没有效果。</p>
<p>修改对应的代码：</p>
<p>window.open("http://blog.fufuok.com/", "popWin", "height=700, width=940, top=0, left=1000, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes");</p>
<p>让弹出窗口在当前窗口的背后，可以这样写，没IE6，没测试过，IE7等选项卡浏览器没有效果。</p>
<p>popWinstr = window.open(http://blog.fufuok.com/, "popWin", "height=700, width=500, top=0, left=1000, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes");<br />
popWinstr .blur();<br />
window.focus();</p>
<p>－－－</p>
<p>除此之外，使用showModalDialog可以直接弹出窗口，而且不易被拦截。</p>
<p>      window.showModalDialog('http://blog.fufuok.com/');</p>
<p>要弹出最大化窗口，可以修改代码为：</p>
<p>      window.showModalDialog('http://blog.fufuok.com/','','dialogWidth:'+screen.availWidth+';dialogHeight:'+screen.availHeight+';');</p>
<p>－－－</p>
<p>网页中使用弹出窗口的确是不友好的，各式各样的屏蔽弹出窗口的招数使得正当想用一下弹窗的时候又麻烦了，先整理这两个吧。能使用DIV窗口的时候就尽量用DIV来作提示为好，像百度空间的操作提示代码、Light Window等都是一些很好的过渡办法。</p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2009/04/30/%e4%b8%8d%e6%98%93%e8%a2%ab%e6%8b%a6%e6%88%aa%e7%9a%84%e5%bc%b9%e5%87%ba%e7%aa%97%e5%8f%a3%e4%bb%a3%e7%a0%81/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://liaoran.blog.35.cn/2008/08/23/hello-world/</link>
		<comments>http://liaoran.blog.35.cn/2008/08/23/hello-world/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 20:06:08 +0000</pubDate>
		<dc:creator>liaoran.openid.35.com</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[欢迎来到Blog@35。 这是系统默认的第一篇文章，您可以删除或者修改它。如果您遇到问题需要帮助，请访问FAQ，或者发送邮件到：35blog@35.cn。接下去，您可以开始博客之旅啦！
]]></description>
			<content:encoded><![CDATA[<p>欢迎来到<a href="http://blog.35.cn/">Blog@35</a>。 这是系统默认的第一篇文章，您可以删除或者修改它。如果您遇到问题需要帮助，请访问<a href="http://blog.35.cn/faq.php">FAQ</a>，或者发送邮件到：35blog@35.cn。接下去，您可以开始博客之旅啦！</p>
]]></content:encoded>
			<wfw:commentRss>http://liaoran.blog.35.cn/2008/08/23/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

