<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>朱文昊 Albert Zhu &#187; 服务器和网站类</title>
	<atom:link href="http://zhuwenhao.com/category/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/feed/" rel="self" type="application/rss+xml" />
	<link>http://zhuwenhao.com</link>
	<description>朱文昊的中文博客－－专注技术，向往自由</description>
	<lastBuildDate>Sun, 22 Jan 2012 13:47:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>监测Apache运行状态，如果崩溃就重启Apache</title>
		<link>http://zhuwenhao.com/948/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e7%9b%91%e6%b5%8bapache%e8%bf%90%e8%a1%8c%e7%8a%b6%e6%80%81%ef%bc%8c%e5%a6%82%e6%9e%9c%e5%b4%a9%e6%ba%83%e5%b0%b1%e9%87%8d%e5%90%afapache/</link>
		<comments>http://zhuwenhao.com/948/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e7%9b%91%e6%b5%8bapache%e8%bf%90%e8%a1%8c%e7%8a%b6%e6%80%81%ef%bc%8c%e5%a6%82%e6%9e%9c%e5%b4%a9%e6%ba%83%e5%b0%b1%e9%87%8d%e5%90%afapache/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:44:22 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=948</guid>
		<description><![CDATA[首先我一直没有搞清楚为什么我的Apache会经常崩溃。这可不是什么值得炫耀的事情。所以有人能帮我分析吗？我会非常感谢。
因为Apache经常崩溃，我又查不出原因，之后写一个脚本监测Apache是死是活，如果事情不对劲，就重启Apache。
分享脚本如下

View Code BASH1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
Apache_Thread_Num=$&#40;ps -e &#124; grep -c 'httpd'&#41;
Min_Normal_Thread=$&#40;grep 'MinSpareServers'  [...]]]></description>
			<content:encoded><![CDATA[<p>首先我一直没有搞清楚为什么我的Apache会经常崩溃。这可不是什么值得炫耀的事情。所以有人能帮我分析吗？我会非常感谢。<br />
因为Apache经常崩溃，我又查不出原因，之后写一个脚本监测Apache是死是活，如果事情不对劲，就重启Apache。<br />
分享脚本如下</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p948code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9482"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code" id="p948code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">Apache_Thread_Num</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'httpd'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">Min_Normal_Thread</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'MinSpareServers'</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>server-tuning.conf <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">&quot;[0-9]{1,}&quot;</span> -o<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$Apache_Thread_Num</span> <span style="color: #660033;">-lt</span> <span style="color: #007800;">$Min_Normal_Thread</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
<span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">time</span> point =<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> <span style="color: #ff0000;">&quot;+%Y-%m-%d-%H-%M-%S&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> Apache dead, alive thread <span style="color: #c20cb9; font-weight: bold;">less</span> than MinSpareServers
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">Apache_Thread_Num</span>=<span style="color: #007800;">$Apache_Thread_Num</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">Min_Normal_Thread</span>=<span style="color: #007800;">$Min_Normal_Thread</span>
   <span style="color: #666666; font-style: italic;"># service apache2 restart</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #666666; font-style: italic;">#else</span>
<span style="color: #666666; font-style: italic;">#       echo time point =`date &quot;+%Y-%m-%d-%H-%M-%S&quot;`</span>
<span style="color: #666666; font-style: italic;">#       echo apache alive</span>
<span style="color: #666666; font-style: italic;">#       echo Apache_Thread_Num=$Apache_Thread_Num</span>
<span style="color: #666666; font-style: italic;">#       echo Min_Normal_Thread=$Min_Normal_Thread</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>然后把它加到crontab里每分钟运行，世界似乎清静一些了。</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/948/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e7%9b%91%e6%b5%8bapache%e8%bf%90%e8%a1%8c%e7%8a%b6%e6%80%81%ef%bc%8c%e5%a6%82%e6%9e%9c%e5%b4%a9%e6%ba%83%e5%b0%b1%e9%87%8d%e5%90%afapache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>代码高亮插件的用法和语言列表</title>
		<link>http://zhuwenhao.com/945/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bb%a3%e7%a0%81%e9%ab%98%e4%ba%ae%e6%8f%92%e4%bb%b6%e7%9a%84%e7%94%a8%e6%b3%95%e5%92%8c%e8%af%ad%e8%a8%80%e5%88%97%e8%a1%a8/</link>
		<comments>http://zhuwenhao.com/945/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bb%a3%e7%a0%81%e9%ab%98%e4%ba%ae%e6%8f%92%e4%bb%b6%e7%9a%84%e7%94%a8%e6%b3%95%e5%92%8c%e8%af%ad%e8%a8%80%e5%88%97%e8%a1%a8/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:38:01 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=945</guid>
		<description><![CDATA[本篇日志纯粹个人备忘，大部分读者可以直接忽略。
我使用WP-CodeBox做本站带代码可视化工具。 provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts.Wrap code blocks with

Download download.txt1
&#160;

. The LANG is supported by wide range of popular languages syntax. The FILE will create  [...]]]></description>
			<content:encoded><![CDATA[<p>本篇日志纯粹个人备忘，大部分读者可以直接忽略。<br />
我使用WP-CodeBox做本站带代码可视化工具。 provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts.Wrap code blocks with</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left2">Download <a href="http://zhuwenhao.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=945&amp;download=download.txt">download.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9454"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p945code4"><pre class="language" style="font-family:monospace;">&nbsp;</pre></td></tr></table></div>

<p>. The LANG is supported by wide range of popular languages syntax. The FILE will create code downloading attribute. line=”n”is the starting line number, colla=”+/-” will expand/collapse the codebox.<br />
应该也是基于GeSHi来做的。支持语言的列表见：</p>
<p>http://gehrcke.de/files/perm/wp-geshi-highlight/wp-geshi-highlight_languages_1_0_5.txt</p>
<p><span id="more-945"></span><br />
# WP-GeSHi-Highlight by Jan-Philip Gehrcke &#8212; http://gehrcke.de<br />
# version 1.0.5 (GeSHi 1.0.8.10)<br />
# allowed values for the `lang` attribute (GeSHi supported languages strings)</p>
<p>4cs<br />
6502acme<br />
6502kickass<br />
6502tasm<br />
68000devpac<br />
abap<br />
actionscript<br />
actionscript3<br />
ada<br />
algol68<br />
apache<br />
applescript<br />
apt_sources<br />
asm<br />
asp<br />
autoconf<br />
autohotkey<br />
autoit<br />
avisynth<br />
awk<br />
bascomavr<br />
bash<br />
basic4gl<br />
bf<br />
bibtex<br />
blitzbasic<br />
bnf<br />
boo<br />
c<br />
caddcl<br />
cadlisp<br />
cfdg<br />
cfm<br />
chaiscript<br />
cil<br />
clojure<br />
cmake<br />
cobol<br />
coffeescript<br />
cpp-qt<br />
cpp<br />
csharp<br />
css<br />
cuesheet<br />
c_loadrunner<br />
c_mac<br />
d<br />
dcs<br />
delphi<br />
diff<br />
div<br />
dos<br />
dot<br />
e<br />
ecmascript<br />
eiffel<br />
email<br />
epc<br />
erlang<br />
euphoria<br />
f1<br />
falcon<br />
fo<br />
fortran<br />
freebasic<br />
fsharp<br />
gambas<br />
gdb<br />
genero<br />
genie<br />
gettext<br />
glsl<br />
gml<br />
gnuplot<br />
go<br />
groovy<br />
gwbasic<br />
haskell<br />
hicest<br />
hq9plus<br />
html4strict<br />
html5<br />
icon<br />
idl<br />
ini<br />
inno<br />
intercal<br />
io<br />
j<br />
java<br />
java5<br />
javascript<br />
jquery<br />
kixtart<br />
klonec<br />
klonecpp<br />
langs<br />
latex<br />
lb<br />
lisp<br />
llvm<br />
locobasic<br />
logtalk<br />
lolcode<br />
lotusformulas<br />
lotusscript<br />
lscript<br />
lsl2<br />
lua<br />
m68k<br />
magiksf<br />
make<br />
mapbasic<br />
matlab<br />
mirc<br />
mmix<br />
modula2<br />
modula3<br />
mpasm<br />
mxml<br />
mysql<br />
newlisp<br />
nsis<br />
oberon2<br />
objc<br />
objeck<br />
ocaml-brief<br />
ocaml<br />
oobas<br />
oracle11<br />
oracle8<br />
oxygene<br />
oz<br />
pascal<br />
pcre<br />
per<br />
perl<br />
perl6<br />
pf<br />
php-brief<br />
php<br />
pic16<br />
pike<br />
pixelbender<br />
pli<br />
plsql<br />
postgresql<br />
povray<br />
powerbuilder<br />
powershell<br />
proftpd<br />
progress<br />
prolog<br />
properties<br />
providex<br />
purebasic<br />
pycon<br />
python<br />
q<br />
qbasic<br />
rails<br />
rebol<br />
reg<br />
robots<br />
rpmspec<br />
rsplus<br />
ruby<br />
sas<br />
scala<br />
scheme<br />
scilab<br />
sdlbasic<br />
smalltalk<br />
smarty<br />
sql<br />
systemverilog<br />
tcl<br />
teraterm<br />
text<br />
thinbasic<br />
tsql<br />
typoscript<br />
unicon<br />
uscript<br />
vala<br />
vb<br />
vbnet<br />
verilog<br />
vhdl<br />
vim<br />
visualfoxpro<br />
visualprolog<br />
whitespace<br />
whois<br />
winbatch<br />
xbasic<br />
xml<br />
xorg_conf<br />
xpp<br />
yaml<br />
z80<br />
zxbasic</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/945/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bb%a3%e7%a0%81%e9%ab%98%e4%ba%ae%e6%8f%92%e4%bb%b6%e7%9a%84%e7%94%a8%e6%b3%95%e5%92%8c%e8%af%ad%e8%a8%80%e5%88%97%e8%a1%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>download.zhuwenhao.com redirected to d.zhu.im</title>
		<link>http://zhuwenhao.com/943/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/download-zhuwenhao-com-redirected-to-d-zhu-im/</link>
		<comments>http://zhuwenhao.com/943/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/download-zhuwenhao-com-redirected-to-d-zhu-im/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:30:49 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=943</guid>
		<description><![CDATA[偶然发现一个很简短的域名zhu.im被某人掉下来了。赶紧注册。
于是把原来的下载站download.zhuwenhao.com使用htaccess转成了d.zhu.im
大家可以使用d.zhu.im去访问我同步的Android和其他很多的源代码了。是不是方便记忆很多了？
顺便说下htaccess写法。

View Code BASH1
2
3
RewriteEngine On
rewritecond %&#123;http_host&#125; !^d\.zhu\.im &#91;NC&#93;
rewriterule ^&#40;.*&#41;$ http://d.zhu.im/$1  [...]]]></description>
			<content:encoded><![CDATA[<p>偶然发现一个很简短的域名zhu.im被某人掉下来了。赶紧注册。<br />
于是把原来的下载站download.zhuwenhao.com使用htaccess转成了d.zhu.im<br />
大家可以使用d.zhu.im去访问我同步的Android和其他很多的源代码了。是不是方便记忆很多了？<br />
顺便说下htaccess写法。</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p943code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9436"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p943code6"><pre class="bash" style="font-family:monospace;">RewriteEngine On
rewritecond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>http_host<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">!</span>^d\.zhu\.im <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC<span style="color: #7a0874; font-weight: bold;">&#93;</span>
rewriterule ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>$ http:<span style="color: #000000; font-weight: bold;">//</span>d.zhu.im<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">R</span>=<span style="color: #000000;">301</span>,NC<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/943/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/download-zhuwenhao-com-redirected-to-d-zhu-im/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>优化Apache, 消除Page Speed中expiration not specified</title>
		<link>http://zhuwenhao.com/801/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bc%98%e5%8c%96apache-%e6%b6%88%e9%99%a4page-speed%e4%b8%adexpiration-not-specified/</link>
		<comments>http://zhuwenhao.com/801/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bc%98%e5%8c%96apache-%e6%b6%88%e9%99%a4page-speed%e4%b8%adexpiration-not-specified/#comments</comments>
		<pubDate>Tue, 03 May 2011 07:56:25 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=801</guid>
		<description><![CDATA[前情提要:
Google Lab 里有一个很好的工具 Page Speed，能够分析网站是不是够快，以及如何改进。提供非常详细的改进指导。
我测试了网站http://zhuwenhao.com 其中有一个严重问题，名字叫 expiration not specified 就是说很多静态资源没有指定过期时间，所以不能被浏览器很好的做缓存，严重影响性能。这里是谷歌提供的文档 LeverageBrowserCaching。
我是这样搞定的：
1：在/etc/sysconfig/apache2中开启Apache模块 mod_headers  [...]]]></description>
			<content:encoded><![CDATA[<p>前情提要:</p>
<p>Google Lab 里有一个很好的工具 Page Speed，能够分析网站是不是够快，以及如何改进。提供非常详细的改进指导。</p>
<p>我测试了网站http://zhuwenhao.com 其中有一个严重问题，名字叫 expiration not specified 就是说很多静态资源没有指定过期时间，所以不能被浏览器很好的做缓存，严重影响性能。这里是谷歌提供的文档 <a href="http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching" target="_blank">LeverageBrowserCaching</a>。</p>
<p>我是这样搞定的：</p>
<p>1：在/etc/sysconfig/apache2中开启Apache模块 mod_headers  mod_expires</p>
<p>2：在/ect/apache2/conf.d/中新建一个mycache.conf(其实我早就建好了:)</p>
<p>3：使用如下的代码</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p801code8'); return false;">View Code</a> APACHE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8018"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code" id="p801code8"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_expires.c&gt;
  <span style="color: #00007f;">ExpiresActive</span> <span style="color: #0000ff;">on</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># Perhaps better to whitelist expires rules? Perhaps.</span>
  <span style="color: #00007f;">ExpiresDefault</span>                          <span style="color: #7f007f;">&quot;access plus 1 day&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)</span>
<span style="color: #adadad; font-style: italic;">#  ExpiresByType text/cache-manifest       &quot;access plus 0 seconds&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># your document html</span>
  <span style="color: #adadad; font-style: italic;">#ExpiresByType text/html                 &quot;access plus 0 seconds&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># data</span>
 <span style="color: #adadad; font-style: italic;"># ExpiresByType text/xml                  &quot;access plus 0 seconds&quot;</span>
 <span style="color: #adadad; font-style: italic;"># ExpiresByType application/xml           &quot;access plus 0 seconds&quot;</span>
 <span style="color: #adadad; font-style: italic;"># ExpiresByType application/json          &quot;access plus 0 seconds&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># rss feed</span>
<span style="color: #adadad; font-style: italic;">#  ExpiresByType application/rss+xml       &quot;access plus 1 hour&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># favicon (cannot be renamed)</span>
  <span style="color: #00007f;">ExpiresByType</span> image/x-icon              <span style="color: #7f007f;">&quot;access plus 2 months&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># media: images, video, audio</span>
  <span style="color: #00007f;">ExpiresByType</span> image/gif                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> image/png                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> image/jpg                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> image/jpeg                <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> video/ogg                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> audio/ogg                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> video/mp4                 <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> video/webm                <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># htc files  (css3pie)</span>
  <span style="color: #00007f;">ExpiresByType</span> text/x-component          <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># webfonts</span>
  <span style="color: #00007f;">ExpiresByType</span> font/truetype             <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> font/opentype             <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> application/x-font-woff   <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> image/svg+xml             <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> application/vnd.ms-fontobject <span style="color: #7f007f;">&quot;access plus 1 month&quot;</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># css and javascript</span>
  <span style="color: #00007f;">ExpiresByType</span> text/css                  <span style="color: #7f007f;">&quot;access plus 2 months&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> application/javascript    <span style="color: #7f007f;">&quot;access plus 2 months&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> text/javascript           <span style="color: #7f007f;">&quot;access plus 2 months&quot;</span>
  <span style="color: #00007f;">ExpiresByType</span> text/x-js                 <span style="color: #7f007f;">&quot;access plus 2 months&quot;</span>
&nbsp;
  &lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_headers.c&gt;
    <span style="color: #00007f;">Header</span> append Cache-Control <span style="color: #7f007f;">&quot;public&quot;</span>
  &lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;
&nbsp;
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;</pre></td></tr></table></div>

<p>我的解决方法参考了帖子： <a href="http://stackoverflow.com/questions/5531994/specifing-expiration-date-for-static-files-caches" target="_blank">specifing-expiration-date-for-static-files-caches</a> 但代码是不一样的，请注意根据需要修改</p>
<p>重申我用的是 openSUSE, 所以配置文件的路径可能不同.</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/801/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bc%98%e5%8c%96apache-%e6%b6%88%e9%99%a4page-speed%e4%b8%adexpiration-not-specified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[建站日记]]></series:name>
	</item>
		<item>
		<title>服务器升级至openSUSE 11.4 Apache改为Worker+PHP+fastcgi</title>
		<link>http://zhuwenhao.com/797/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8d%87%e7%ba%a7%e8%87%b3opensuse-11-4-apache%e6%94%b9%e4%b8%baworkerphpfastcgi/</link>
		<comments>http://zhuwenhao.com/797/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8d%87%e7%ba%a7%e8%87%b3opensuse-11-4-apache%e6%94%b9%e4%b8%baworkerphpfastcgi/#comments</comments>
		<pubDate>Tue, 03 May 2011 04:16:34 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=797</guid>
		<description><![CDATA[利用假期,我把本站的服务器和配置都做了下升级.
openSUSE从11.2升级至11.4,非常成功,没有遇到大问题.
主要步骤:
1, 更新Software Repositories指向11.4版本的库.
2, zypper update , 解决依赖性. 升级一些包,降级一些包. 以前用开发分支的Apache, PHP, mysql要先降级.幸好这个危险的过程没有出任何问题.
3, zypper dup, 将会做完全的版本升级.
然后是Apache配置由perfork改为Worker的MPM.
1, 删除mod_php, 确认PHP支持CLI
2, 安装 mod_fcgid  [...]]]></description>
			<content:encoded><![CDATA[<p>利用假期,我把本站的服务器和配置都做了下升级.</p>
<p>openSUSE从11.2升级至11.4,非常成功,没有遇到大问题.</p>
<p>主要步骤:</p>
<p>1, 更新Software Repositories指向11.4版本的库.</p>
<p>2, zypper update , 解决依赖性. 升级一些包,降级一些包. 以前用开发分支的Apache, PHP, mysql要先降级.幸好这个危险的过程没有出任何问题.</p>
<p>3, zypper dup, 将会做完全的版本升级.</p>
<p>然后是Apache配置由perfork改为Worker的MPM.</p>
<p>1, 删除mod_php, 确认PHP支持CLI</p>
<p>2, 安装 mod_fcgid mod_fastcgi</p>
<p>3, 修改 /etc/sysconfig/apache2 中的APACHE_MODULES字段, 删除php, 增加actions, facgid, fastcgi</p>
<p>4, 修改路径 /etc/apache2/conf.d/ 中的 mod_fcgid.conf 去掉&lt;FilesMatch “\.php$”&gt;这一块内容的注释.</p>
<p>最后 service apache2 restart 就搞定了.</p>
<p>完成后,可以看出Apache本事基本不消耗多少内存,但是PHP占用内存仍然很多. 所以Apache头上占用内存的坏名声可以洗脱了.一切都是PHP惹的祸.</p>
<p>在这种配置下, 使用 ab 工具测试, 在Apache过载之后,网页会出现500错误,但随着DDOS的结束, server能够自行恢复. 不像以前用perfork的时候,Apache就死了. 读Apache错误日志, 会发现Apache给失去响应的PHP发了一堆的signal 11. Good Job!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/797/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8d%87%e7%ba%a7%e8%87%b3opensuse-11-4-apache%e6%94%b9%e4%b8%baworkerphpfastcgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[建站日记]]></series:name>
	</item>
		<item>
		<title>WordPress“正在执行例行维护”的解决办法</title>
		<link>http://zhuwenhao.com/795/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/wordpress%e2%80%9c%e6%ad%a3%e5%9c%a8%e6%89%a7%e8%a1%8c%e4%be%8b%e8%a1%8c%e7%bb%b4%e6%8a%a4%e2%80%9d%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/</link>
		<comments>http://zhuwenhao.com/795/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/wordpress%e2%80%9c%e6%ad%a3%e5%9c%a8%e6%89%a7%e8%a1%8c%e4%be%8b%e8%a1%8c%e7%bb%b4%e6%8a%a4%e2%80%9d%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/#comments</comments>
		<pubDate>Tue, 03 May 2011 03:32:14 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=795</guid>
		<description><![CDATA[本文转自 月光博客, 还好我用wordpress一直没有遇到过这个问题.
折腾WordPress的时候，升级了一个主题，结果主题升级失败，WordPress首页也打不开了，所有的页面都一直提示：“正在执行例行维护，请一分钟后回来。”
我等了不止一分钟，系统还是没有恢复正常，只好FTP登录主机看一下，后来发现 WordPress 根目录多了一个 .maintenance 文件，将这个文件删除，之后再刷新一下WordPress首页，显示正常。
这个经验告诉我们，不要在正式环境下随便升级主题模版。
作者：williamlong
&#160;
]]></description>
			<content:encoded><![CDATA[<p>本文转自 月光博客, 还好我用wordpress一直没有遇到过这个问题.</p>
<p>折腾WordPress的时候，升级了一个主题，结果主题升级失败，WordPress首页也打不开了，所有的页面都一直提示：“正在执行例行维护，请一分钟后回来。”</p>
<p>我等了不止一分钟，系统还是没有恢复正常，只好FTP登录主机看一下，后来发现 WordPress 根目录多了一个 .maintenance 文件，将这个文件删除，之后再刷新一下WordPress首页，显示正常。</p>
<p>这个经验告诉我们，不要在正式环境下随便升级主题模版。</p>
<p>作者：<a href="http://www.williamlong.info/blog/archives/768.html">williamlong</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/795/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/wordpress%e2%80%9c%e6%ad%a3%e5%9c%a8%e6%89%a7%e8%a1%8c%e4%be%8b%e8%a1%8c%e7%bb%b4%e6%8a%a4%e2%80%9d%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改主题支持两种菜单并存</title>
		<link>http://zhuwenhao.com/480/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bf%ae%e6%94%b9%e4%b8%bb%e9%a2%98%e6%94%af%e6%8c%81%e4%b8%a4%e7%a7%8d%e8%8f%9c%e5%8d%95%e5%b9%b6%e5%ad%98/</link>
		<comments>http://zhuwenhao.com/480/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bf%ae%e6%94%b9%e4%b8%bb%e9%a2%98%e6%94%af%e6%8c%81%e4%b8%a4%e7%a7%8d%e8%8f%9c%e5%8d%95%e5%b9%b6%e5%ad%98/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:13:17 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=480</guid>
		<description><![CDATA[在本站升级到Wordpress 3.0后，浏览了一下许久没有看过的themes目录，发现几个我喜欢的主题，经过一番试用，发现Mystique也就是您现在看到的主题最合我心意，后来才发现这也是digitalnature的作品，good job！
美中不足的是，Mystique配置界面中主菜单只能在无、链接、页面、分类目录和自定义菜单中做单选，我希望能把分类目录和自定义菜单并存，一起显示出来。可惜作者没有设计这样的功能。Hacking的真谛就是要自己动手，当然还有无私分享。下面我就贴出我的做法：
先来看看core.php中相关功能实现函数

View Code  [...]]]></description>
			<content:encoded><![CDATA[<p>在本站升级到Wordpress 3.0后，浏览了一下许久没有看过的themes目录，发现几个我喜欢的主题，经过一番试用，发现Mystique也就是您现在看到的主题最合我心意，后来才发现这也是digitalnature的作品，good job！</p>
<p>美中不足的是，Mystique配置界面中主菜单只能在无、链接、页面、分类目录和自定义菜单中做单选，我希望能把分类目录和自定义菜单并存，一起显示出来。可惜作者没有设计这样的功能。Hacking的真谛就是要自己动手，当然还有无私分享。下面我就贴出我的做法：</p>
<p>先来看看core.php中相关功能实现函数</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p480code13'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p48013"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code" id="p480code13"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// print the main navigation menu</span>
<span style="color: #000000; font-weight: bold;">function</span> mystique_navigation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$navtype</span> <span style="color: #339933;">=</span> get_mystique_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'navigation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
   <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;shadow-left&quot;</span><span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;shadow-right clearfix&quot;</span><span style="color: #339933;">&gt;</span>
   <span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000088;">$nav_extra</span> <span style="color: #339933;">=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mystique_navigation_extra&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// check for new icons and output</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nav_extra</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p class=&quot;nav-extra&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$nav_extra</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span>  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
   <span style="color: #339933;">&lt;</span>ul id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;navigation&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;clearfix&quot;</span><span style="color: #339933;">&gt;</span>
     <span style="color: #000000; font-weight: bold;">&lt;?php</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'show_on_front'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> get_mystique_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'exclude_home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
       <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>is_paged<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #339933;">&lt;</span>li <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;active home&quot;</span><span style="color: #339933;">&gt;&lt;</span>a <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;home active fadeThis&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo get_settings('home'); ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('You are Home','mystique'); ?&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Home'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mystique'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pointer&quot;</span><span style="color: #339933;">&gt;&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
       <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #339933;">&lt;</span>li <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;home&quot;</span><span style="color: #339933;">&gt;&lt;</span>a <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;home fadeThis&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo get_option('home'); ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('Click for Home','mystique'); ?&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Home'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mystique'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pointer&quot;</span><span style="color: #339933;">&gt;&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
      <span style="color: #000000; font-weight: bold;">&lt;?php</span>
       <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
     <span style="color: #000000; font-weight: bold;">&lt;?php</span>
       <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'categories'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
        mystique_list_categories<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hide_empty'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'exclude'</span> <span style="color: #339933;">=&gt;</span> get_mystique_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'exclude_categories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
       <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
        <span style="color: #000088;">$links</span> <span style="color: #339933;">=</span> get_bookmarks<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'orderby'</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'order'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'limit'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'category'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'category_name'</span>  <span style="color: #339933;">=&gt;</span> get_mystique_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'navigation_links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'hide_invisible'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'show_updated'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'include'</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'search'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
         <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_target</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$target</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">' target=&quot;'</span><span style="color: #339933;">.</span>wp_specialchars<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_target</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> <span style="color: #000088;">$target</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_rel</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$rel</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">' rel=&quot;'</span><span style="color: #339933;">.</span>wp_specialchars<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_rel</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> <span style="color: #000088;">$rel</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_description</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">' title=&quot;'</span><span style="color: #339933;">.</span>wp_specialchars<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a class=&quot;fadeThis&quot; href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$target</span><span style="color: #339933;">.</span><span style="color: #000088;">$rel</span><span style="color: #339933;">.</span><span style="color: #000088;">$title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&gt;&lt;span class=&quot;title&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/span&gt;&lt;span class=&quot;pointer&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
&nbsp;
       <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span>
        mystique_list_pages<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'exclude'</span> <span style="color: #339933;">=&gt;</span> get_mystique_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'exclude_pages'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sort_column'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_order'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
&nbsp;
       do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mystique_navigation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   <span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>可以看出，作者整体设计的时候，就没有想要让用户做复选，在条件判断中使用了连续的if &#8230; elseif&#8230; 实现。</p>
<p>我采用了一个偷懒的方法仅把</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p480code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p48014"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p480code14"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'categories'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span></pre></td></tr></table></div>

<p>注释掉，然后把接下来的</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p480code15'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p48015"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p480code15"><pre class="php" style="font-family:monospace;"> <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span></pre></td></tr></table></div>

<p>改成</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p480code16'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p48016"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p480code16"><pre class="php" style="font-family:monospace;"> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navtype</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'links'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span></pre></td></tr></table></div>

<p>就可以啦。</pre>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/480/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e4%bf%ae%e6%94%b9%e4%b8%bb%e9%a2%98%e6%94%af%e6%8c%81%e4%b8%a4%e7%a7%8d%e8%8f%9c%e5%8d%95%e5%b9%b6%e5%ad%98/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>自动备份数据库并发送到电子邮箱的脚本</title>
		<link>http://zhuwenhao.com/385/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e8%87%aa%e5%8a%a8%e5%a4%87%e4%bb%bd%e6%95%b0%e6%8d%ae%e5%ba%93%e5%b9%b6%e5%8f%91%e9%80%81%e5%88%b0%e7%94%b5%e5%ad%90%e9%82%ae%e7%ae%b1%e7%9a%84%e8%84%9a%e6%9c%ac/</link>
		<comments>http://zhuwenhao.com/385/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e8%87%aa%e5%8a%a8%e5%a4%87%e4%bb%bd%e6%95%b0%e6%8d%ae%e5%ba%93%e5%b9%b6%e5%8f%91%e9%80%81%e5%88%b0%e7%94%b5%e5%ad%90%e9%82%ae%e7%ae%b1%e7%9a%84%e8%84%9a%e6%9c%ac/#comments</comments>
		<pubDate>Tue, 11 May 2010 12:17:43 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=385</guid>
		<description><![CDATA[将网站数据库备份后留在本地硬盘上，并不是一个可靠的方案。我就把压缩后的文件发送到电子邮件信箱里。Gmail的附件目前最大25兆，QQ邮箱是50兆，所以本方法不适合大型商业网站，个人独立博客比较合适的说。
下面贴出脚本，本方法需要先安装mutt邮件客户端。
请注意，有些老点的文章中给出的示例，在邮件地址前面没有 &#8212; 符号，这会造成新版本的mutt提示 No recipients specified. 只要加上 &#8212;  [...]]]></description>
			<content:encoded><![CDATA[<p>将网站数据库备份后留在本地硬盘上，并不是一个可靠的方案。我就把压缩后的文件发送到电子邮件信箱里。Gmail的附件目前最大25兆，QQ邮箱是50兆，所以本方法不适合大型商业网站，个人独立博客比较合适的说。</p>
<p>下面贴出脚本，本方法需要先安装mutt邮件客户端。<br />
请注意，有些老点的文章中给出的示例，在邮件地址前面没有 &#8212; 符号，这会造成新版本的mutt提示 No recipients specified. 只要加上 &#8212; 符号就可以了。<br />
还有一个注意的地方，如果连续发送很多数据库文件并保存在Sent文件中，很快就会消耗大量的本地硬盘空间。让mutt默认不保存已发送邮件的方法是修改 /etc/Muttrc文件，或者在当前用户home目录下，修改或建立一个隐藏文件 .muttrc (注意这两个M的大小写)， 修改或增加这样一行 set record=”/dev/null” （一般默认为 set record=”~/Sent”），就可以让Mutt不保存已发送邮件从而节省空间了。</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p385code18'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p38518"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code" id="p385code18"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
sendfiletogmail <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #007800;">FilePath</span>=<span style="color: #007800;">$1</span>
        <span style="color: #007800;">FileName</span>=<span style="color: #007800;">$2</span><span style="color: #ff0000;">&quot;.bz2&quot;</span>
        mutt <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;Database Backup File <span style="color: #007800;">${FileName}</span>&quot;</span> <span style="color: #660033;">-a</span><span style="color: #800000;">${FilePath}</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #800000;">${FileName}</span> <span style="color: #660033;">--</span> yourMailBox<span style="color: #000000; font-weight: bold;">@</span>gmail.com <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #ff0000;">&quot;/path/to/emailbody.txt&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
&nbsp;
backup <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #007800;">DBName</span>=$<span style="color: #000000; font-weight: bold;">@</span>
        <span style="color: #007800;">BackupPath</span>=<span style="color: #ff0000;">&quot;/path/to/&quot;</span><span style="color: #800000;">${DBName}</span>
        <span style="color: #007800;">BackupName</span>=<span style="color: #800000;">${DBName}</span>-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> <span style="color: #ff0000;">&quot;+[%z%Z]%Y-%m-%d-%H-%M-%S&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;.sql&quot;</span>
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${BackupPath}</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #800000;">${BackupPath}</span>;
                <span style="color: #000000; font-weight: bold;">then</span>
                                <span style="color: #000000; font-weight: bold;">if</span>        mysqldump <span style="color: #660033;">-uroot</span> <span style="color: #660033;">-pYourPasswd</span> \
                                                <span style="color: #660033;">--default-character-set</span>=utf8 <span style="color: #660033;">--opt</span> <span style="color: #660033;">--master-data</span>=<span style="color: #000000;">1</span> \
                                                <span style="color: #660033;">--single-transaction</span> <span style="color: #660033;">--flush-logs</span> \
                                                <span style="color: #800000;">${DBName}</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #800000;">${BackupPath}</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #800000;">${BackupName}</span>;
                                <span style="color: #000000; font-weight: bold;">then</span>
                                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${BackupName}</span><span style="color: #ff0000;">&quot;Backup success!&quot;</span>
                                                <span style="color: #c20cb9; font-weight: bold;">bzip2</span> <span style="color: #660033;">-q</span> <span style="color: #660033;">-s</span>  <span style="color: #800000;">${BackupPath}</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #800000;">${BackupName}</span>;
                                                sendfiletogmail <span style="color: #800000;">${BackupPath}</span> <span style="color: #800000;">${BackupName}</span>
                                <span style="color: #000000; font-weight: bold;">else</span>
                                                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${BackupName}</span><span style="color: #ff0000;">&quot;Backup Failed@@@@@@@@@@@@@@@@@@@@@@@@&quot;</span>
                                <span style="color: #000000; font-weight: bold;">fi</span>
                <span style="color: #000000; font-weight: bold;">fi</span>
                <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #800000;">${BackupPath}</span><span style="color: #ff0000;">&quot;/&quot;</span> <span style="color: #660033;">-ctime</span> +<span style="color: #000000;">7</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #666666; font-style: italic;">#Call the function to backup database assigned below</span>
backup  yourDBnamd_db</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/385/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/%e8%87%aa%e5%8a%a8%e5%a4%87%e4%bb%bd%e6%95%b0%e6%8d%ae%e5%ba%93%e5%b9%b6%e5%8f%91%e9%80%81%e5%88%b0%e7%94%b5%e5%ad%90%e9%82%ae%e7%ae%b1%e7%9a%84%e8%84%9a%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[建站日记]]></series:name>
	</item>
		<item>
		<title>name.com的whois隐私注册要收费了!?</title>
		<link>http://zhuwenhao.com/353/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/name-com%e7%9a%84whois%e9%9a%90%e7%a7%81%e6%b3%a8%e5%86%8c%e8%a6%81%e6%94%b6%e8%b4%b9%e4%ba%86/</link>
		<comments>http://zhuwenhao.com/353/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/name-com%e7%9a%84whois%e9%9a%90%e7%a7%81%e6%b3%a8%e5%86%8c%e8%a6%81%e6%94%b6%e8%b4%b9%e4%ba%86/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 04:02:52 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/353/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/name-com%e7%9a%84whois%e9%9a%90%e7%a7%81%e6%b3%a8%e5%86%8c%e8%a6%81%e6%94%b6%e8%b4%b9%e4%ba%86/</guid>
		<description><![CDATA[今天打开name.com的控制面板,发现所有的Whois Privacy都从域名后面的位置另起一行,并且用红色反现.顿时预感不对.搞什么花样?很快就反应过来,肯定是要收费了.
此前免费的Whois Privacy服务一直都是name.com的特色.喜欢上name.com也是因为这个.但是估计是眼红Godaddy靠这个赚钱吧,name.com耐不住寂寞了.现在也开始收费.而且标价很贵,7.99USD/yr,现在有优惠价格为$1.99/yr.
幸好我的域名都续费了好多年,暂时不用管.但是,是不是需要在找个便宜的注册商把域名都转过去呢? 郁闷&#8230;.
PS:  [...]]]></description>
			<content:encoded><![CDATA[<p>今天打开name.com的控制面板,发现所有的Whois Privacy都从域名后面的位置另起一行,并且用红色反现.顿时预感不对.搞什么花样?很快就反应过来,肯定是要收费了.</p>
<p>此前免费的Whois Privacy服务一直都是name.com的特色.喜欢上name.com也是因为这个.但是估计是眼红Godaddy靠这个赚钱吧,name.com耐不住寂寞了.现在也开始收费.而且标价很贵,7.99USD/yr,现在有优惠价格为$1.99/yr.</p>
<p>幸好我的域名都续费了好多年,暂时不用管.但是,是不是需要在找个便宜的注册商把域名都转过去呢? 郁闷&#8230;.</p>
<p>PS: 经过浏览name.com的官方博客,发现他们现在提供一个优惠码“<b>FREEWHOIS</b>”,可以减掉订单中第一年的1.99$费用,到0.00$(不就是免费一年嘛). </p>
<p>转载一下他们的条款原文</p>
<ul>
<li>All domains that currently have Private Whois already turned on will continue to receive it for free. </li>
<li>The new pricing will begin today and will only apply to domains that don’t already have Private Whois enabled and/or new domain registrations. </li>
<li>We are running a promotional price of just $1.99/domain per year, which is one of the lowest prices available. </li>
<li>We’ve created a promo code called “<b>FREEWHOIS</b>” that will discount the current special pricing of $1.99 to $0.00, making this service free for the first year for orders using this promo code. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/353/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/name-com%e7%9a%84whois%e9%9a%90%e7%a7%81%e6%b3%a8%e5%86%8c%e8%a6%81%e6%94%b6%e8%b4%b9%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello, IPv6!</title>
		<link>http://zhuwenhao.com/334/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/hello-ipv6/</link>
		<comments>http://zhuwenhao.com/334/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/hello-ipv6/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 13:16:41 +0000</pubDate>
		<dc:creator>朱文昊 Albert Zhu</dc:creator>
				<category><![CDATA[服务器和网站类]]></category>

		<guid isPermaLink="false">http://zhuwenhao.com/?p=334</guid>
		<description><![CDATA[I just moved my sites to a brand new server with IPv6 enabled. You can ping6 zhuwenhao.com or host zhuwenhao.com to test.
My IPv6 address is [2607:f2f8:3340::1eee]
Welcome to my blog via IPv6 network!
]]></description>
			<content:encoded><![CDATA[<p>I just moved my sites to a brand new server with IPv6 enabled. You can ping6 zhuwenhao.com or host zhuwenhao.com to test.<br />
My IPv6 address is [2607:f2f8:3340::1eee]<br />
Welcome to my blog via IPv6 network!</p>
]]></content:encoded>
			<wfw:commentRss>http://zhuwenhao.com/334/%e6%8a%80%e6%9c%af/%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e7%bd%91%e7%ab%99%e7%b1%bb/hello-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[建站日记]]></series:name>
	</item>
	</channel>
</rss>

