<?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/"
	>

<channel>
	<title>木子小鱼的博客 &#187; 学习笔记</title>
	<atom:link href="http://www.muzifish.com/archives/category/learning-notes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.muzifish.com</link>
	<description>评论经济互联网,记载生活点滴,共享资源的草根博客</description>
	<lastBuildDate>Fri, 06 Aug 2010 10:21:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>人生最大的学问之一：爱情，是什么？</title>
		<link>http://www.muzifish.com/archives/1592.html</link>
		<comments>http://www.muzifish.com/archives/1592.html#comments</comments>
		<pubDate>Sat, 15 May 2010 03:42:20 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[人生]]></category>
		<category><![CDATA[学问]]></category>
		<category><![CDATA[爱情]]></category>
		<category><![CDATA[真谛]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1592.html</guid>
		<description><![CDATA[这篇文章不是我的原创，是从同学的空间转载过来的，据说是出自一位教师之手。读过之后，我认为写得很好，写出了很多非常现实的问题，希望大家都来读一读这篇文章，想一想自己。我把这篇文章归类在学习笔记之中，而不是生活琐碎，因为我觉得爱情这东西，是人生之中最大的学问之一，学习好了你可能会幸福终生，如果学不好，那[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1592.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>这篇文章不是我的原创，是从同学的空间转载过来的，据说是出自一位教师之手。读过之后，我认为写得很好，写出了很多非常现实的问题，希望大家都来读一读这篇文章，想一想自己。我把这篇文章归类在学习笔记之中，而不是生活琐碎，因为我觉得爱情这东西，是人生之中最大的学问之一，学习好了你可能会幸福终生，如果学不好，那可就难说了。即将踏进社会，爱情和婚姻这件事情，我想距离我们应当不会太远了，所以，我们当一起好好地学习。以下是文章的原文：</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/1_thumb.jpg" width="460" height="308" /></a> </p>
<p>致我所有的朋友   <br />无论已婚与未婚    <br />这是篇很好的文章。    <br />如果你暂时没有时间细细品味，也请你有时间的时候将自己的心沉淀下来，    <br />用心的看。    <br />好的文章真的不多了</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/2_thumb.jpg" width="292" height="404" /></a> </p>
<p>单身，有时不一定是贵族。   <br />单身也许会比较自由，    <br />但自由也有一个同义词，叫作寂寞。    <br />因为人不是什么时候都喜欢一个人独处的；    <br />有时好东西需要人分享，    <br />有时候难过需要人安慰。    <br />单身贵族产生的原因，是因为    <br />经济上的独立、人格上的独立以及感情上的独立。    <br />独立是什么？    <br />独立是需要而不是依赖，    <br />一个独立的人需要异性，而不依赖异性。    <br />做情人之前，她应该先是朋友。    <br />她成为你的朋友之后，出现在你的生活里，    <br />才有可能认识你、了解你、知道你的长处    <br />而对你产生好感，进一步发展感情，变成情人、对象。    <br />世界上的颜色并非只有白色和黑色，    <br />黑与白之间还有很漫长的灰色地带。    <br />只要多相处，便能发现对方的优点、产生好感，    <br />这才是发展感情的自然过程。    <br />[一见钟情]以及[从一而终]的感情是不切实际的，    <br />我们需要的不是这种不切实际而虚幻的感情。    <br />有人形容跟异性交往，    <br />就好像在海边捡石头，大家都会捡喜欢的那一颗。    <br />一但捡到一颗你最喜欢的石头，便把它带回家去，    <br />好好对待它，因为那是你唯一的石头。    <br />而且要记住，从此后不要再到海边去。</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/3_thumb.jpg" width="364" height="484" /></a> </p>
<p>永远相信，   <br />我已经找到最大、最美、最适合我的那一颗。    <br />跟异性交往最重要的不是他有多好，    <br />而是他对你有多好。    <br />一个人如果条件很好，有一百分，    <br />可是这一百分之中，他只给你三四十分，或一二十分；    <br />相反地，另一个人也许只有七八十分，    <br />可是他却是全心全意的对待你，    <br />那你应该选择哪一个？    <br />其实，每一个人的条件都是一样的。    <br />不管你有多好，都还有人比你更好。    <br />你虽然做不到一个[最好的人]，    <br />可是你却做得到一个[对对方最好的人]。    <br />每一个男孩子都可以说：    <br />[虽然我不是世界上最好的男人，但我是世界上对你最好的男人]。    <br />反过来女孩子也是一样，这是每一个人都做得到的。</p>
<p>感情最重要的是在于他/她对你有多好，   <br />而不是他/她自己有多好。    <br />但是如果有一个人本身已经很好了，    <br />对你又是真心真意，真心爱你，    <br />那么你真的可以把一生托付给他。    <br />现在女性考虑婚姻的唯一条件，    <br />应该就是你爱不爱他，他爱不爱你，    <br />是不是真心真意对你，    <br />跟他在一起会不会有压力，会不会快乐，    <br />而非他有什么！    <br />人间的真爱是很难得的。    <br />在人的一生中，    <br />很难找到一个你真正爱，真正可以跟他过一辈子的人。    <br />如果你怯于表达，    <br />或害怕会有什么事，    <br />错失一辈子可能只有一次的真爱，    <br />那就太可惜了，    <br />所以一定要采取主动，把心里的话说出来。</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/4_thumb.jpg" width="371" height="474" /></a> </p>
<p>如果一个男孩子   <br />因为女孩子对他采取主动而看不起她，    <br />那么这个男孩子不是男生，而是畜生。    <br />更何况，幸福比面子重要，    <br />如果牺牲一时的面子可以换得一生的幸福，    <br />是非常值得的，勇敢把心里的话说出来，    <br />不要隐藏自己的真心。    <br />千万别说缘分未到，其实缘分到处都有，    <br />但却是稍纵即逝，如果说[缘]不及时把握，    <br />那就没有[份]了。    <br />大多数的女性对感情是偏重于精神，    <br />男性则偏于物质。    <br />男孩子除了对女孩子殷勤体贴外，    <br />也要学会对女孩子负责任，    <br />要将对天下所有女孩子的殷勤体贴，    <br />全部用来对一个女孩子。    <br />另外，    <br />刚毅木纳并不能讨女孩欢心，    <br />所以要学习对女孩子甜言蜜语，多说好话。    <br />一个维持起来轻松、愉快的感情容易长久！    <br />一个维持下来艰难而痛苦的感情不易长久，    <br />这时候就应该有所选择。    <br />我们都是凡夫俗子，    <br />要的是平凡而幸福并且快乐的爱情。    <br />对所有的感情而言，过程远比结果重要。    <br />为什么？因为所有的感情都是没有结果的。    <br />什么是结果？结婚吗？    <br />结婚之后就过着幸福快乐的日子吗？    <br />可见我们不以感情的结果来评价它的价值。    <br />感情，也不以时间的长短来论定它的价值。</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/5.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/5_thumb.jpg" width="404" height="304" /></a> </p>
<p>对感情而言，凡是发生过的都存在，   <br />凡是存在过的都有价值。    <br />世界上的感情每一段、每一分、每一秒    <br />都是值得珍惜的。    <br />婚姻是人生里最大的一场赌局。    <br />在这无限长的时间里，    <br />我们还要互相呈现最丑陋的一面给对方看。    <br />婚姻和恋爱不同的是：    <br />恋爱可以花两个小时打扮自己，    <br />精神奕奕的向对方献殷勤、体贴，轻松完成任务。    <br />可是婚姻就无法随时维持高亢的状态。    <br />所以，婚姻是一场大赌注，    <br />需有万全的准备、周详的计划，十足的信心，    <br />然后再去押它一把，即使是这样都还有可能输掉。    <br />因此如果在赌之前，就知道自己    <br />不是心甘情愿、不是很爱他、并不想跟他过一辈子，    <br />那么这一场赌注定是要输的。</p>
<p>千万不要   <br />为了爱情之外的任何一个理由结婚。    <br />感情的可贵    <br />不在于可从对方获得什么，    <br />一方面是一种被依赖、被需要的感觉。    <br />有人依赖我，需要我，    <br />我会得到满足。    <br />面对感情，我们所要采取的就是三不政策：    <br />第一是不急：不要急着结婚。    <br />结婚虽然是很美好的事，但是不要着急，    <br />该是你的就是你的。    <br />第二是不怕：不要害怕付出。    <br />彼此必需一辈子努力，才能把感情维持好。    <br />你不可能[得到]一个美好的感情，    <br />你只能找到一个你心爱的人，    <br />来共同经营、造就、完成一段美好的感情。    <br />如果你没决心做好男人，那你就得不到好女人。</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/6.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/6_thumb.jpg" width="458" height="306" /></a> </p>
<p>世界上没有一个坏男人会有一个好女人，   <br />坏男人只会有可怜的女人；    <br />同样的，也没有一个坏女人会有一个好男人。    <br />何况感情中还有一个    <br />跟我们共同努力、想把它做好的人。    <br />这个合夥事业成功的机会是很大的，    <br />关键就在于你是否愿意努力、付出而已。    <br />第三是不要放弃。    <br />当你受了打击、挫折、伤害，    <br />当你感到灰心、失望时，    <br />有一个人无条件的，永远站在你这一边，    <br />支持你、鼓励你、安慰你，    <br />让你重新站起来面对这个世界。    <br />这个力量，是再亲的父母都不能给我们的，    <br />是再要好的朋友也不能给我们的，    <br />只有在人生的旅程中所找到的心爱的伴侣，    <br />才能够给我们。</p>
<p><a href="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/8.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="爱情是什么" border="0" alt="爱情是什么" src="http://www.muzifish.com/uploads/3c74ae26a9a5_A02D/8_thumb.jpg" width="244" height="324" /></a> </p>
<p>其实爱情是人生唯一的、真正珍贵的，   <br />也是唯一的、真正值得追求的东西。    <br />只要你有一个心爱的人，    <br />你就有了原动力，    <br />你就能面对全世界。</p>
<h3  class="related_post_title">随便看看</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1570.html" title="学校在心中的位置">学校在心中的位置</a></li><li><a href="http://www.muzifish.com/archives/1597.html" title="程序以外的互联网安全">程序以外的互联网安全</a></li><li><a href="http://www.muzifish.com/archives/1495.html" title="共享免费VPN帐号">共享免费VPN帐号</a></li><li><a href="http://www.muzifish.com/archives/1568.html" title="听老奶奶说起往事">听老奶奶说起往事</a></li><li><a href="http://www.muzifish.com/archives/1182.html" title="谷歌撤出中国 百度不应欢喜">谷歌撤出中国 百度不应欢喜</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1136.html" title="国际金融部分习题参考答案">国际金融部分习题参考答案</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1493.html" title="linux下Nginx+php+FastCGI的实现方案">linux下Nginx+php+FastCGI的实现方案</a></li><li><a href="http://www.muzifish.com/archives/1204.html" title="中国城市建设统计年鉴（年报）2000-2007">中国城市建设统计年鉴（年报）2000-2007</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1592.html">http://www.muzifish.com/archives/1592.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/%e4%ba%ba%e7%94%9f" rel="tag">人生</a>, <a href="http://www.muzifish.com/archives/tag/%e5%ad%a6%e9%97%ae" rel="tag">学问</a>, <a href="http://www.muzifish.com/archives/tag/%e7%88%b1%e6%83%85" rel="tag">爱情</a>, <a href="http://www.muzifish.com/archives/tag/%e7%9c%9f%e8%b0%9b" rel="tag">真谛</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1592.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>跨浏览器的javascript加载XML文档方法</title>
		<link>http://www.muzifish.com/archives/1585.html</link>
		<comments>http://www.muzifish.com/archives/1585.html#comments</comments>
		<pubDate>Mon, 03 May 2010 04:11:50 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[兼容]]></category>
		<category><![CDATA[加载]]></category>
		<category><![CDATA[浏览器]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1585.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 话说这些天都在忙着编写桂电在线网络直播所用的页面代码，而又因为自己的机子上没装任何数据库，又不能在桂电在线服务器的数据库上测试，这两年学习PHP+MySQL,对于ASP生疏了不少，ASP.NET又不用，PHP对于来讲不是主流，也没有配置相关运行环境，所以就采用了[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1585.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 话说这些天都在忙着编写桂电在线网络直播所用的页面代码，而又因为自己的机子上没装任何数据库，又不能在桂电在线服务器的数据库上测试，这两年学习PHP+MySQL,对于ASP生疏了不少，ASP.NET又不用，PHP对于来讲不是主流，也没有配置相关运行环境，所以就采用了javascript+xml的方式写了。</p>
<p><a href="http://www.muzifish.com/uploads/javascriptXML_98BF/javascriptxmlbrowser.jpg">&#160;<img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="javascript-xml-browser" border="0" alt="javascript-xml-browser" src="http://www.muzifish.com/uploads/javascriptXML_98BF/javascriptxmlbrowser_thumb.jpg" width="450" height="388" /></a>&#160;&#160;&#160; 在网上查找了许多关于javascript加载XML文档的文章，但几乎都遇到了同一个问题，那就是对非IE浏览器的兼容问题。于是在总结前人的方法后，折腾了半个多小时，终于弄出了兼容IE/FF/CHORME/OPERA的JS代码，在此记之，待后查。</p>
<p>// 加载xml文档,兼容IE/FF/CHROME   <br />loadXML = function(fileRoute) {    <br />&#160; xmlDoc = null;    <br />&#160; if (window.ActiveXObject) {    <br />&#160;&#160;&#160; var xmlDom = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);    <br />&#160;&#160;&#160; xmlDom.async = false;    <br />&#160;&#160;&#160; xmlDom.preserveWhiteSpace = true;    <br />&#160;&#160;&#160; xmlDom.load(fileRoute);    <br />&#160;&#160;&#160; xmlDoc = xmlDom.documentElement;    <br />&#160; }    <br />&#160; else if (document.implementation &amp;&amp; document.implementation.createDocument) {    <br />&#160;&#160;&#160;&#160; var xmlhttp = new window.XMLHttpRequest();    <br />&#160;&#160;&#160;&#160; xmlhttp.open(&quot;GET&quot;, fileRoute, false);    <br />&#160;&#160;&#160;&#160; xmlhttp.send(null);    <br />&#160;&#160;&#160;&#160;&#160; xmlDoc = xmlhttp.responseXML.documentElement;    <br />&#160;&#160; }    <br />&#160; else { xmlDoc = null; }    <br />&#160;&#160;&#160;&#160; return xmlDoc;    <br />&#160;&#160; } </p>
<p>//对xml对象进行判断   <br />checkXMLDocObj&#160;&#160;&#160; = function(xmlFile)    <br />{    <br />&#160;&#160;&#160; var xmlDoc&#160;&#160;&#160; = loadXML(xmlFile);    <br />&#160;&#160;&#160; if(xmlDoc==null)    <br />&#160;&#160;&#160; {    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(&#8216;您的浏览器不支持xml文件读取,请您更改浏览器设置或者升级您的浏览器后再刷新本页!&#8217;);&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; }&#160;&#160;&#160; <br />&#160;&#160;&#160; return xmlDoc;    <br />}</p>
<p>&#160;&#160;&#160; 另外，在对XML文档进行节点选取时使用seleteNodes方法不兼容非IE浏览器，推荐使用getElementsByTagName()方法。总之，在使用javascript对XML文件进行操作时请事先学习各浏览器相互不兼容的语法区别，尽量避免即可。</p>
<h3  class="related_post_title">随便看看</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1597.html" title="程序以外的互联网安全">程序以外的互联网安全</a></li><li><a href="http://www.muzifish.com/archives/1448.html" title="Google推出微博产品Google Buzz">Google推出微博产品Google Buzz</a></li><li><a href="http://www.muzifish.com/archives/1568.html" title="听老奶奶说起往事">听老奶奶说起往事</a></li><li><a href="http://www.muzifish.com/archives/1487.html" title="百度和谷歌应当相互学习，取彼之长补已之短">百度和谷歌应当相互学习，取彼之长补已之短</a></li><li><a href="http://www.muzifish.com/archives/1588.html" title="应届毕业生就业二三事之女性就业机会平等的问题">应届毕业生就业二三事之女性就业机会平等的问题</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1146.html" title="有道海量词典-网易推出的免费在线词典">有道海量词典-网易推出的免费在线词典</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1594.html" title="毕业论文致谢词">毕业论文致谢词</a></li><li><a href="http://www.muzifish.com/archives/1572.html" title="贵州省统计年鉴2009下载">贵州省统计年鉴2009下载</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1585.html">http://www.muzifish.com/archives/1585.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/javascript" rel="tag">javascript</a>, <a href="http://www.muzifish.com/archives/tag/xml" rel="tag">xml</a>, <a href="http://www.muzifish.com/archives/tag/%e5%85%bc%e5%ae%b9" rel="tag">兼容</a>, <a href="http://www.muzifish.com/archives/tag/%e5%8a%a0%e8%bd%bd" rel="tag">加载</a>, <a href="http://www.muzifish.com/archives/tag/%e6%b5%8f%e8%a7%88%e5%99%a8" rel="tag">浏览器</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1585.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows下让Nginx+PHP以系统服务方式启动</title>
		<link>http://www.muzifish.com/archives/1561.html</link>
		<comments>http://www.muzifish.com/archives/1561.html#comments</comments>
		<pubDate>Sat, 03 Apr 2010 07:37:27 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1561.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 上次笔记了windows平台下nginx+php的安装配置,并且写了关于nginx+php(FastCGI)的启动、停止、重启批处理命令。但是，这种方法的不足之处在于每次都得首先登录系统去手动启动它，对于正常运行的服务器而言，一旦机房停电后服务器重启的话就必须重[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1561.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 上次笔记了<a href="http://www.muzifish.com/archives/1506.html" target="_blank">windows平台下nginx+php的安装配置</a>,并且写了关于<a href="http://nginx.org" target="_blank">nginx</a>+<a href="http://php.net" target="_blank">php</a>(FastCGI)的启动、停止、重启批处理命令。但是，这种方法的不足之处在于每次都得首先登录系统去手动启动它，对于正常运行的服务器而言，一旦机房停电后服务器重启的话就必须重新登录系统去手动启动，相对而言管理不是那么地方便。所以，如果让nginx以系统服务的方式启动的话,这个问题就基本得到了解决了。</p>
<p>&#160;&#160;&#160; 以下的方法是我参考微软帮助与支持中心《<a href="http://support.microsoft.com/kb/137890" target="_blank">如何创建用户自定义服务</a>》后总结出来的方法，经过在实体服务器上的实践部署，证实可行：</p>
<p>&#160;&#160;&#160; 我的安装环境是：Microsoft Server 2003 R2 Standard Edition / Nginx 0.8.34 / PHP 5.2.13</p>
<p>&#160;&#160;&#160; 在配置过程中需要用到<a href="http://www.muzifish.com/uploads/soft/instsrv.exe" target="_blank">Instsrv.exe</a>和<a href="http://www.muzifish.com/uploads/soft/srvany.exe" target="_blank">Srvany.exe</a>这两个文件，这两个文件包含在<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&amp;displaylang=en" target="_blank">Windows Server 2003 Resource Kit Tools</a>中，可在微软下载中心获得（推荐在官方网站下载）。下载后将这两个文件放在系统目录(默认是C:\WINDOWS\system32)下,打开命令提示符(CMD),执行以下命令:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; instsrv NGINX&#160; C:\WINDOWS\system32\srvany.exe</p>
<p>&#160;&#160;&#160; 新建一个注册表文件nginx.reg,编辑内容如下:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Windows Registry Editor Version 5.00</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NGINX\Parameters] </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Application&quot;=&quot;C:\\sbin\\nginx\\nginx.exe&quot;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;AppParameters&quot;=&quot;&quot;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;AppDirectory&quot;=&quot;C:\\sbin\\nginx\\&quot;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NGINX] </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Description&quot;=&quot;NGINX WEB 服务器&quot;</p>
<p>&#160;&#160;&#160; 然后将注册表文件合并到注册表即可（我一般直接双击，但也可以用通过命令行进行操作，cd (path to the nginx.reg),然后regedit /s nginx.reg）。上面的注册表含义如下:Parameters是指设置nginx服务的参数,其中Application是程序路径,AppParameters是指启动参数,AppDirectory是指程序的在目录.而下面的Description是指添加这个服务的描述。此外，还有许多的参数设置，有兴趣者可以参考MS的注册表管理。到此，nginx web服务器在windows中以系统服务方式启动的配置就完成了,大家可以用在命令行中以net start nginx和net stop nginx以及net restart nginx命令来测试服务是否安装正确了。如果安装正确的话，以后就不用在windows重启后再手动来启动nginx了。</p>
<p>&#160;&#160;&#160; 之前有讲过nginx+php在windows下运行时,php-cgi.exe会弹出一个CMD框,并且还不能关闭,于是有人就用RunHiddenConsole.exe来隐藏对话框,这个方法倒是挺好用的,但我认为还有更好用的方法.那就是让php-cgi.exe也以系统服务的方式运行,这样是没有对话框弹出的。而且如果不以系统服务的方式运行的话，要想让nginx支持PHP同样需要登录系统去手动启动php-cgi.exe,这样相对不方便。何不让它像nginx一样以服务方式运行呢,对吧?</p>
<p>&#160;&#160;&#160; 在命令行中运行如下命令</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; instsrv&#160; FastCGI&#160; C:\WINDOWS\system32\srvany.exe</p>
<p>&#160;&#160;&#160; 新建注册表文件FastCGI.reg,编辑内容如下:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Windows Registry Editor Version 5.00 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FastCGI\Parameters]&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Application&quot;=&quot;C:\\sbin\\php5\\php-cgi.exe&quot;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;AppParameters&quot;=&quot;&quot;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;AppDirectory&quot;=&quot;C:\\sbin\\php5\\&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NGINX]&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Description&quot;=&quot;PHP5 FastCGI模块,用于支持nginx运行PHP程序&quot;</p>
<p>&#160;&#160;&#160; 保存并导入合并到注册表就行了。如此，在windows系统启动时会同时启动nginx和php-cgi.exe,无需手动登录操作。在登录后可以用net start,net restart,net stop这些命令来操作nginx和php的启动、重启和停止，是不是比原来的批处理好许多咧？这样是不需要RunHiddenConsole.exe的啵。</p>
<p>&#160;&#160;&#160; 最后，再说一下，如果在创建服务过程中出错或者创建不成功，或者创建服务成功，但是运行不了的话，可以在命令行中用&quot;sc delete 服务名&quot;来删除刚才创建的服务,然后从头再来。</p>
<p>&#160;&#160;&#160; 以上操作均在实际部署的实体服务器测试通过，不是在虚拟机哦，原创的文章，转载请注明哦，谢谢！</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1493.html" title="linux下Nginx+php+FastCGI的实现方案">linux下Nginx+php+FastCGI的实现方案</a></li><li><a href="http://www.muzifish.com/archives/1340.html" title="在Windows 7中修改系统hosts文件的方法">在Windows 7中修改系统hosts文件的方法</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1561.html">http://www.muzifish.com/archives/1561.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/nginx" rel="tag">nginx</a>, <a href="http://www.muzifish.com/archives/tag/php" rel="tag">php</a>, <a href="http://www.muzifish.com/archives/tag/windows" rel="tag">windows</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1561.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress博客搬迁及域名相关方案</title>
		<link>http://www.muzifish.com/archives/1530.html</link>
		<comments>http://www.muzifish.com/archives/1530.html#comments</comments>
		<pubDate>Tue, 16 Mar 2010 15:00:35 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[多域名]]></category>
		<category><![CDATA[搬迁]]></category>
		<category><![CDATA[方案]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1530.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 最近在密谋博客的搬迁及添加域名事件,在Yahoo Small Business廉价($1.99,用PayPal支付的话约14.08RMB)注册了Muzifish.COM,联系好了空间(空间是网上的名博主友情赞助的)，一切都悄无声息的进行中…下面就逐步将相关问题实[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1530.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 最近在密谋博客的搬迁及添加域名事件,在<a href="http://smallbusiness.yahoo.com" target="_blank">Yahoo Small Business</a>廉价($1.99,用PayPal支付的话约14.08RMB)注册了<a href="http://www.muzifish.com" target="_blank">Muzifish.COM</a>,联系好了空间(空间是网上的名博主友情赞助的)，一切都悄无声息的进行中…下面就逐步将相关问题实现的方法晒出来,留个笔记,也希望能够帮助有需要的童鞋。至于为什么考虑博客搬迁及添加新域名，择日再议。</p>
<p>&#160;&#160;&#160; 1.WordPress绑定多个域名问题。因为WordPress是采用绝对路径访问的,所以在默认情况下WordPress会通过定义WP_HOME和WP_SITEURL这两个变量来固定博客的访问域名,固定访问域名有些人说是一种SEO行为,但个人对SEO没什么追求,喜欢博客能够通过多个域名来访问而不必都转发至固定的一个域名。那么怎么样才能实现WordPress绑定多域名呢?既然WordPress是通过定义变量来实现域名固定的,那么从这两个变量的定义入手就可以了,具体就是在WordPress的配置文件wp_config.php中给WP_HOME和WP_SITEURL这两个变量赋值就可以了,这里的WP_HOME是指博客的访问地址,而WP_SITEURL则是指博客的安装地址。具体代码如下:</p>
<div>
<pre>      $homeurl = 'http://'.$_SERVER['HTTP_HOST'];
      $siteurl = 'http://'.$_SERVER['HTTP_HOST'];
      define('WP_HOME',$homeurl);
      define('WP_SITEURL',$siteurl);</pre>
</div>
<p>&#160;&#160;&#160; 将上面的代码添加至wp-config.php这个文件中就可以实现多域名访问了。实质上如果纯粹上为了能够实现多域名访问而已的话只需要定义WP_HOME这个变量就可以了,因为WP_SITEURL指的是博客的安装地址,为了安全起见,木子小鱼不推荐用以上代码定义WP_SITEURL,而是通过在后台控制面板设置跟访问不一样的URL来增强博客后台的安全性。对于采用不同域名加上配置.htaccess文件以增强WordPress博客安全性的方法,小鱼正在Sun VirtualBox中反复测试,如果成功再发布,在此不议。</p>
<p>&#160;&#160;&#160; 2.WordPress独立博客变更域名的实施方案。前段时间，我的一名比较好的博友<a href="http://hcc.name" target="_blank">箫韶九成</a> 最终还是放弃.CN域名,投入了.NAME的怀抱,但其在变更域名之后并没有将原来的域名重定向(传说中的301永久重定向)到新域名,这样的结果有可能会损失一部分的访客,对SEO也是不好友的，前期的SEO工作会前功尽弃，一切都得从新开始，包括搜索引擎的收录。但是如果对原域名做了重定向的话是可以继承原域名的。如何实现更改域名后与原域名的无缝切换的呢?这主要是通过替换数据库中的相关域名值以及修改Linux主机中的.htaccess文件来实现的,对于替换数据库中的域名信息，最快捷的方法是备份数据库，用文字编辑软件打开数据库备份SQL文件，用新的域名替换旧域名，然后清空网络数据库，再导入修改后的数据库文件即可。在数据库中替换了域名后再打开空间根目录下的.htaccess文件,删除其中的全部内容,添加如下代码:</p>
<div>
<pre><span style="color: #0000ff">      &lt;</span><span style="color: #800000">IfModule</span> <span style="color: #ff0000">mod_rewrite</span>.<span style="color: #ff0000">c</span><span style="color: #0000ff">&gt;</span>
        Options +FollowSymLinks
        RewriteEngine on
        rewritecond %{http_host} ^www.muzifish.com [nc]   //旧域名
         rewriterule ^(.*)$ http://www.muzifish.com/$1 [L,R=301]  //新域名
<span style="color: #0000ff">      &lt;/</span><span style="color: #800000">IfModule</span><span style="color: #0000ff">&gt;</span></pre>
</div>
<p>&#160;&#160;&#160; 到此，博客域名变更的无缝切换就完成了，但上述方法的实现需要满足以下几个条件:</p>
<p>&#160;&#160;&#160; a.应当是Linux或者Unix类系统主机,因为Windows系统不支持修改.htaccess文件</p>
<p>&#160;&#160;&#160; b.网站的结构和固定链接保持不变.</p>
<p>&#160;&#160;&#160; c.更改域名后,两个域名需要继续运行一段时间,大概两三个月吧.</p>
<p>&#160;&#160;&#160; 3.WordPress迁移实施方案。此种情形多见于变更主机空间。之前两步，现在实现博客的空间转移就变得简单多了。对于不变更域名的迁移，只需要将当前网站的所有文件转移到新空间，将现网站数据库信息导入新的数据库，然后修改wp-config.php文件即可.如果既换空间又改域名的话就参照第2点去做就可以,现在想来,确实也有些简单。</p>
<p>&#160;&#160;&#160; 本来还是写如何建立WordPress站点或者备份站点的,但写到这里不想写了,有兴趣的童鞋可以加我QQ或发邮件和我交流。我的博客愿景是将它变成一个交流的博客,创新因交流而迸发!</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1530.html">http://www.muzifish.com/archives/1530.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%a4%9a%e5%9f%9f%e5%90%8d" rel="tag">多域名</a>, <a href="http://www.muzifish.com/archives/tag/%e6%90%ac%e8%bf%81" rel="tag">搬迁</a>, <a href="http://www.muzifish.com/archives/tag/%e6%96%b9%e6%a1%88" rel="tag">方案</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1530.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在wordpress中获取文章图片及获得图片路径的方法</title>
		<link>http://www.muzifish.com/archives/1523.html</link>
		<comments>http://www.muzifish.com/archives/1523.html#comments</comments>
		<pubDate>Sat, 13 Mar 2010 15:51:50 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[图片]]></category>
		<category><![CDATA[正则]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[路径]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1523.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 在wordpress中获取文章中图片的方法有很多,也可以通过安装插件的方式获取,在此这里我总结了网上的通行实现方法,列表一下在Wordpress主题模板中获取文章图片以及获得文章图片路径的方法,这对于制作wordpress主题时调用文章图片有一定的帮助。话不多说[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1523.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 在wordpress中获取文章中图片的方法有很多,也可以通过安装插件的方式获取,在此这里我总结了网上的通行实现方法,列表一下在Wordpress主题模板中获取文章图片以及获得文章图片路径的方法,这对于制作wordpress主题时调用文章图片有一定的帮助。话不多说，直晒代码：</p>
<div class="cnblogs_code">
<pre><img id="Code_Closed_Image_537411" onclick="this.style.display=&#39;none&#39;; document.getElementById(&#39;Code_Closed_Text_537411&#39;).style.display=&#39;none&#39;; document.getElementById(&#39;Code_Open_Image_537411&#39;).style.display=&#39;inline&#39;; document.getElementById(&#39;Code_Open_Text_537411&#39;).style.display=&#39;inline&#39;;" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" /><img id="Code_Open_Image_537411" style="display: none" onclick="this.style.display=&#39;none&#39;; document.getElementById(&#39;Code_Open_Text_537411&#39;).style.display=&#39;none&#39;; getElementById(&#39;Code_Closed_Image_537411&#39;).style.display=&#39;inline&#39;; getElementById(&#39;Code_Closed_Text_537411&#39;).style.display=&#39;inline&#39;;" height="16" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" /><span class="cnblogs_code_Collapse" id="Code_Closed_Text_537411">展开查看相关代码</span><span id="Code_Open_Text_537411" style="display: none"><span style="color: #0000ff">&lt;?</span>php
<span style="color: #008000">//从文章中搜索图片并获取图片</span>
$SoImages  = '<span style="color: #8b0000">~&lt;img [^\&gt;]*\ /&gt;~</span>';
<a style="color: #ffa500" href="http://www.php.net/preg_match_all">preg_match_all</a>($SoImages,$post-&gt;post_content,$Images);
$PictureAmount=<a style="color: #ffa500" href="http://www.php.net/count">count</a>($Images[0]);　<span style="color: #008000">//获取图片数量</span>

<span style="color: #008000">//处理所有的图片</span>
<a style="color: #0000ff" href="http://www.php.net/for">for</a>($i=0;$i&lt;$PictureAmount;$i++){
	<a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $Images[0][$i]  <span style="color: #008000">//处理图片,语句可以自定义,第一张图片为$Images[0][0];</span>
	}

<span style="color: #008000">//通过使用switch控制语句处理第一张图片,也可以使用if...else...elseif语句来实现,具体逻辑请自定义</span>
<a style="color: #0000ff" href="http://www.php.net/switch">switch</a>($PictureAmount&gt;0){
	<a style="color: #0000ff" href="http://www.php.net/case">case</a> 1:
	  <a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $Images[0][0];　<span style="color: #008000">//输出第一张图片</span>
	  <a style="color: #0000ff" href="http://www.php.net/break">break</a>;
	<a style="color: #0000ff" href="http://www.php.net/default">default</a>:
	  $ImagesUrl=bloginfo('<span style="color: #8b0000">stylesheet_directory</span>').&quot;<span style="color: #8b0000">/images/1.jpg</span>&quot;;　<span style="color: #008000">//当文章无图片时默认输出的图片</span>
	}

<span style="color: #008000">/*获得文章中的图片链接路径的代码
*首先使用上面第一段的语句从文章搜索并获取图片
*然后通过运行正则表达式来分析图片代码,然后得到匹配的字符
*以下只列出其中的一种正则表达式代码,有兴趣的童鞋可以自己编写
*/</span>

<span style="color: #008000">//获取一张图片,例如获取第一张图片$Images[0][0],其代码样例为:&lt;img alt=&quot;Google&quot; title=&quot;Google&quot; id=&quot;logo&quot; src=&quot;/intl/zh-CN/images/logo_cn.gif&quot; width=&quot;276&quot; height=&quot;110&quot; border=&quot;0&quot;  /&gt;</span>
$ImgUrl = $Images[0][0];
$SoImgAddress=&quot;<span style="color: #8b0000">/\&lt;img.*?src\=\&quot;(.*?)\&quot;[^&gt;]*&gt;/i</span>&quot;;  <span style="color: #008000">//正则表达式语句</span>
<a style="color: #ffa500" href="http://www.php.net/preg_match">preg_match</a>($SoImgAddress,$ImgUrl,$imagesurl);　　<span style="color: #008000">//分析</span>
<a style="color: #0000ff" href="http://www.php.net/echo">echo</a> $imagesurl[1];　<span style="color: #008000">//得到并处理路径:/intl/zh-CN/images/logo_cn.gif</span>
<span style="color: #0000ff">?&gt;</span></span></pre>
</div>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1340.html" title="在Windows 7中修改系统hosts文件的方法">在Windows 7中修改系统hosts文件的方法</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1523.html">http://www.muzifish.com/archives/1523.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%9b%be%e7%89%87" rel="tag">图片</a>, <a href="http://www.muzifish.com/archives/tag/%e6%ad%a3%e5%88%99" rel="tag">正则</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a>, <a href="http://www.muzifish.com/archives/tag/%e8%b7%af%e5%be%84" rel="tag">路径</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1523.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows平台下nginx+php的安装配置</title>
		<link>http://www.muzifish.com/archives/1506.html</link>
		<comments>http://www.muzifish.com/archives/1506.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 20:47:09 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1506.html</guid>
		<description><![CDATA[因为是自己的学习笔记，所以别的话就不多说了，直接写步骤。
我的安装测试环境是：
Microsoft <em>Windows Server 2003</em> R2 <em>Enterprise Edition</em>
<em>Nginx/Windows 0.8.34 </em>
<em>php 5.2.13 VC6 x86 Non Thread Safe</em>
步[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1506.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><font face="宋体" size="2">因为是自己的学习笔记，所以别的话就不多说了，直接写步骤。</font></p>
<p><font face="宋体" size="2">我的安装测试环境是：</font></p>
<p><font size="2"></font><font face="宋体">Microsoft <em>Windows Server 2003</em> R2 <em>Enterprise Edition</em></font></p>
<p><em><a href="http://nginx.org" target="_blank"><font face="宋体" size="2">Nginx</font></a><font face="宋体" size="2">/Windows 0.8.34 </font></em></p>
<p><em><a href="http://php.net" target="_blank"><font face="宋体" size="2">php</font></a><font face="宋体" size="2"> 5.2.13 VC6 x86 Non Thread Safe</font></em></p>
<p><font face="宋体" size="2">步骤如下：</font></p>
<p><font face="宋体" size="2">1.配置PHP。打开PHP的全局配置文件php，查找到cgi.fix_pathinfo=1，将其前面的注释符号去掉。将php所在的文件夹(如我的:C:\sbin\php,具体因个人安装地址而定)以及php扩展库的文件夹(我的:C:\sbin\php\ext)添加到系统环境变量Path中。有的人是把php的全局配置文件php.ini以及一些库文件复制到windows系统文件夹中，这样也是可以的，但我个人认为那样配置PHP的话对于PHP的维护和升级都是不友好的，所以我比较倾向于添加系统环境变量这种方式来加载PHP。所以在配置nginx+php时对于PHP的配置是相当简易的，只需修改cgi.fix_pathinfo这个属性值以及添加系统环境变量就可以了。</font></p>
<p><font face="宋体" size="2">2.配置nginx。解压后，找到其中的conf这个文件夹，打开nginx的主配置文件nginx.conf（建议像我这样的新手在配置前先备份），找到：</font></p>
<p><font face="宋体" size="2">location / {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; root&#160;&#160; html;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index&#160; index.html index.htm;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></p>
<p><font face="宋体" size="2">这个就是我们平常时所说的网站的默认文件索引顺序，在这里的修改只需在index.html前面（前面后面其实都可以，主要是看你是以哪个页面为默认页面布局）添加index.php.然后再找到：</font></p>
<p><font face="宋体" size="2">#location ~ \.php$ {      <br />#&#160;&#160;&#160;&#160;&#160; root&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; html;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_pass&#160;&#160; 127.0.0.1:9000;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_index&#160; index.php;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_param&#160; SCRIPT_FILENAME&#160; /scripts$fastcgi_script_name;       <br />#&#160;&#160;&#160;&#160;&#160; include&#160;&#160;&#160;&#160;&#160;&#160;&#160; fastcgi_params;       <br />#}</font></p>
<p><font face="宋体" size="2">这里是配置nginx+php的关键所在，首先，把前面的注释符号#都去掉，root是指php文件所在的文件夹，根据需要修改就好，一般是指向网站的要目录，fastcgi_index是指fastcgi的默认索引文件，可以根据个人情况而定，一般情况我都不修改的。对于fastcgi_param我的理解是php文件的地址，在这里一般情况下只根据需要把“/scripts”修改为网站的根目录地址就可以了（要用绝对地址，而且最好将windows地址中的路径间隔符替换为反斜杠,即将地址中的“\”替换为“/” ）。修改后的此处大概为：</font></p>
<p><font face="宋体" size="2">location ~ \.php$ {      <br />&#160;&#160;&#160;&#160;&#160; root&#160;&#160;&#160;&#160;&#160; C:/sbin/publish_html;&#160;&#160; #网站根目录地址根据具体情况而定。       <br />&#160;&#160;&#160;&#160;&#160; fastcgi_pass&#160;&#160; 127.0.0.1:9000;       <br />&#160;&#160;&#160;&#160;&#160; fastcgi_index&#160; index.php;       <br />&#160;&#160;&#160;&#160;&#160; fastcgi_param&#160; SCRIPT_FILENAME&#160; <strong>C:/sbin/publish_html</strong>$fastcgi_script_name;       <br />&#160;&#160;&#160;&#160;&#160; include&#160;&#160;&#160;&#160;&#160;&#160;&#160; fastcgi_params;       <br />}</font></p>
<p><font face="宋体" size="2">这样，对于nginx.conf文件的修改就大致完成了。对于此处的修改，也有人建议另外建一个类似php.conf这样的针对php支持的配置文件，然后再通过从外部加载的方式融入到主配置文件中，体现出了较好的编码规范性，也利于日常的维护，特别是添加多个虚拟主机的时候这样做的好处就更为明显了。不过，这两种配置文件的功能是一样的。以下是这种方式的具体步骤：</font></p>
<p><font face="宋体" size="2">首先，在conf文件夹建立php.conf文件（文件名随意），内容如下：</font></p>
<p><font face="宋体" size="2"># 连接到本机 9000 端口，这里的端口是指 PHP FastCGI Server 开启的端口，      <br /># 请与 php-cgi.exe 开启的端口保持一致       <br /># 当 Nginx 收到 php 文件的请求时，会自动转发到 PHP FastCGI Server       <br />fastcgi_pass&#160;&#160;&#160; 127.0.0.1:9000;       <br />fastcgi_index&#160;&#160; index.php;       <br /># Nginx 默认是不支持 CGI PATH_INFO，SCRIPT_NAME 的值也不标准（糅合了 PATH_INFO）       <br /># 下面的两行指令，可以从 SCRIPT_NAME 中剥离出 PATH_INFO       <br />fastcgi_split_path_info&#160;&#160;&#160;&#160; ^(.+\.php)(.*)$;       <br />fastcgi_param PATH_INFO&#160;&#160;&#160;&#160; $fastcgi_path_info;       <br />include&#160;&#160; fastcgi_params;</font></p>
<p><font face="宋体" size="2">保存。然后修改nginx.conf文件：将      <br />#location ~ \.php$ {       <br />#&#160;&#160;&#160;&#160;&#160; root&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; html;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_pass&#160;&#160; 127.0.0.1:9000;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_index&#160; index.php;       <br />#&#160;&#160;&#160;&#160;&#160; fastcgi_param&#160; SCRIPT_FILENAME&#160; /scripts$fastcgi_script_name;       <br />#&#160;&#160;&#160;&#160;&#160; include&#160;&#160;&#160;&#160;&#160;&#160;&#160; fastcgi_params;       <br />#}       <br />修改为：       <br />location ~ ^(.+\.php)(.*)$ {       <br />&#160;&#160;&#160; root&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; C:/sbin/publish_html;&#160;&#160; #网站根目录地址根据具体情况而定。       <br />&#160;&#160;&#160; fastcgi_param&#160;&#160; SCRIPT_FILENAME&#160;&#160;&#160;&#160; <strong>C:/sbin/publish_html</strong>$fastcgi_script_name;&#160; <br />&#160;&#160;&#160; include&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; php.conf;       <br />}       <br />即可。 </font></p>
<p><font face="宋体" size="2">启动nginx。实质上，完成上述的文件配置，nginx+php的配置就已经基本完成了，启动它就可以了。对于nginx的启动，直接点击nginx.exe就可以了，但nginx需要和FastCGI Server配合才能处理PHP请求，所以在启动nginx的同时需要启动FastCGI Server，在windows中普遍的做法是通过命令行的方式启动，即在运行中输入：      <br />C:/sbin/php/php-cgi.exe -b 127.0.0.1:9000 -c C:/sbin/php/php.ini       <br />命令行的C:/sbin/php代表php所在的文件夹路径。但这样的运行的结果是会弹出一个命令提示符的窗口，而且如果人为地关闭它的话就等于关闭了php-cgi.exe进程，以至于无法完成php的事务请求。所以这就需要</font><a href="http://redmine.lighttpd.net/attachments/660/RunHiddenConsole.zip" target="_blank"><font face="宋体" size="2">RunHiddenConsole</font></a><font face="宋体" size="2">.exe这个窗口隐藏小程序来处理这个问题，这个程序可以在lighttpd的官方网站中下载。</font></p>
<p><font face="宋体" size="2">nginx的启动，FastCGI的启动、停止以及重启相对都比较麻烦，所以</font><a href="http://www.muzifish.com" target="_blank"><font face="宋体" size="2">木子小鱼</font>< /a><font face="宋体" size="2">小结了网上的方法后整理出三个批处理以完成上述事务，分别是start.bat(启动)、restart.bat（重启）、stop.bat（停止），代码如下：</font></a></p>
<p><font face="宋体" size="2">####start.bat      <br />@echo off       <br />echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       <br />echo Starting PHP FastCGI&#8230;       <br />echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       <br />RunHiddenConsole C:/server/bin/php5/php-cgi.exe -b 127.0.0.1:9000 -c C:/server/bin/php5/php.ini       <br />echo PHP FastCGI OK..       <br />echo Starting Nginx&#8230;       <br />RunHiddenConsole C:/server/bin/nginx/nginx.exe       <br />echo nginx is running!exit </font></p>
<p><font face="宋体" size="2">####stop.bat      <br />@echo off       <br />echo Stopping Nginx&#8230;       <br />taskkill /F /IM nginx.exe &gt;nul       <br />echo Stopping PHP FastCGI&#8230;       <br />taskkill /F /IM php-cgi.exe &gt;nul       <br />exit</font></p>
<p><font face="宋体" size="2">####restart.bat      <br />@echo off       <br />echo Stopping Nginx&#8230;       <br />taskkill /F /IM nginx.exe &gt;nul       <br />echo Stopping PHP FastCGI&#8230;       <br />taskkill /F /IM php-cgi.exe &gt;nul       <br />set PHP_FCGI_MAX_REQUESTS=1000       <br />echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       <br />echo Starting PHP FastCGI&#8230;       <br />echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       <br />RunHiddenConsole C:/server/bin/php5/php-cgi.exe -b 127.0.0.1:9000 -c C:/server/bin/php5/php.ini       <br />echo PHP FastCGI OK..       <br />echo Starting Nginx&#8230;       <br />RunHiddenConsole C:/server/bin/nginx/nginx.exe       <br />echo nginx is running!       <br />exit</font></p>
<p><font face="宋体" size="2">到这里就基本完成了。哪天有空再写关于nginx开机自动运行的方法。</font></p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1493.html" title="linux下Nginx+php+FastCGI的实现方案">linux下Nginx+php+FastCGI的实现方案</a></li><li><a href="http://www.muzifish.com/archives/1340.html" title="在Windows 7中修改系统hosts文件的方法">在Windows 7中修改系统hosts文件的方法</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1506.html">http://www.muzifish.com/archives/1506.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/fastcgi" rel="tag">FastCGI</a>, <a href="http://www.muzifish.com/archives/tag/nginx" rel="tag">nginx</a>, <a href="http://www.muzifish.com/archives/tag/php" rel="tag">php</a>, <a href="http://www.muzifish.com/archives/tag/windows" rel="tag">windows</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1506.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>搜索引擎网站收录提交地址</title>
		<link>http://www.muzifish.com/archives/1498.html</link>
		<comments>http://www.muzifish.com/archives/1498.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 06:05:08 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[baidu]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[地址]]></category>
		<category><![CDATA[引擎]]></category>
		<category><![CDATA[搜索]]></category>
		<category><![CDATA[收录]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1498.html</guid>
		<description><![CDATA[意在分享，便人便已，大便天下！
百度搜索网站登录口：http://www.baidu.com/search/url_submit.html    Google 网站登录口：http://www.google.com/addurl/?hl=zh-CN&#38;continue=/addurl    向[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1498.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>意在分享，便人便已，大便天下！</p>
<p>百度搜索网站登录口：<a href="http://www.baidu.com/search/url_submit.html">http://www.baidu.com/search/url_submit.html</a>    <br />Google 网站登录口：<a href="http://www.google.com/intl/zh-CN/add_url.html">http://www.google.com/addurl/?hl=zh-CN&amp;continue=/addurl</a>    <br />向Google谷歌提交新闻网站内容<a href="http://www.google.com/support/news_pub/bin/request.py?contact_type=suggest_content&amp;hl=cn">http://www.google.com/support/news_pub/bin/request.py?contact_type=suggest_content&amp;hl=cn</a>    <br />雅虎中国网站登录口：<a href="http://search.help.cn.yahoo.com/h4_4.html">http://search.help.cn.yahoo.com/h4_4.html </a>    <br />中搜网站登录口：<a href="http://ads.zhongsou.com/register/page.jsp">http://ads.zhongsou.com/register/page.jsp</a>    <br />网易有道搜索引擎登录口：<a href="http://tellbot.youdao.com/report">http://tellbot.youdao.com/report</a>    <br />MSN必应网站登录口：<a href="http://cn.bing.com/docs/submit.aspx?FORM=WSDD2">http://cn.bing.com/docs/submit.aspx?FORM=WSDD2</a>    <br />英文雅虎登录口：<a href="http://search.yahoo.com/info/submit.html">http://search.yahoo.com/info/submit.html</a>    <br />森标搜索网站登录：<a href="http://so.senbiao.com/add.asp">http://so.senbiao.com/add.asp</a>    <br />快速登录20个搜索引擎：<a href="http://www.trafficzap.com/searchsubmit.php">http://www.trafficzap.com/searchsubmit.php</a>    <br />TOM搜索网站登录口：<a href="http://search.tom.com/tools/weblog/log.php">http://search.tom.com/tools/weblog/log.php</a>    <br />新浪爱问网站登录口：<a href="http://www.iask.com/guest/add_url.php">http://www.iask.com/guest/add_url.php</a>    <br />新浪登录口（收费）：<a href="http://bizsite.sina.com.cn/newbizsite/docc/index-2jifu-03.htm">http://bizsite.sina.com.cn/newbizsite/docc/index-2jifu-03.htm</a>    <br />网络奇兵登录口：<a href="http://www.net7b.com/net7b_site/denglu.aspx">http://www.net7b.com/net7b_site/denglu.aspx</a>    <br />180度水平线搜索登录口：<a href="http://www.sou180.com/url_add.asp">http://www.sou180.com/url_add.asp</a>    <br />蚁搜搜索网站登录口：<a href="http://www.antso.com/apply.asp">http://www.antso.com/apply.asp</a>    <br />快搜搜索网站登录口：<a href="http://www.kuaisou.com/main/inputweb.asp">http://www.kuaisou.com/main/inputweb.asp</a>    <br />零搜搜索网站登录口：<a href="http://www.0sou.cn/protocol.asp">http://www.0sou.cn/protocol.asp</a>    <br />汕头登录口：<a href="http://www.stsou.com/join.asp">http://www.stsou.com/join.asp</a>    <br />猎商登录口：<a href="http://www.lgoods.com/lg/lgss.htm">http://www.lgoods.com/lg/lgss.htm</a>    <br />企搜搜索登录口：<a href="http://www.qisou.cn/denglu.asp">http://www.qisou.cn/denglu.asp</a>    <br />网页大搜索登录口：<a href="http://www2d.biglobe.ne.jp/%7Ekinryou/cgi/cnaddURL.html">http://www2d.biglobe.ne.jp/~kinryou/cgi/cnaddURL.html</a>    <br />协通搜索登录口：<a href="http://www.net2asp.com.cn/search/regform.htm">http://www.net2asp.com.cn/search/regform.htm</a>    <br />Gais搜索登录口：<a href="http://gais.cs.ccu.edu.tw/reg_new.php">http://gais.cs.ccu.edu.tw/reg_new.php</a>    <br />法律网免费登录口：<a href="http://www.law-lib.com/lawseek/wzdl.asp">http://www.law-lib.com/lawseek/wzdl.asp</a></p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1471.html" title="创业家：Google百度和谷歌的那些事儿">创业家：Google百度和谷歌的那些事儿</a></li><li><a href="http://www.muzifish.com/archives/1474.html" title="AOL中国站疑似被挂马">AOL中国站疑似被挂马</a></li><li><a href="http://www.muzifish.com/archives/1465.html" title="议谷歌创始人布林关于谷歌很难在中国经营的言论">议谷歌创始人布林关于谷歌很难在中国经营的言论</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1182.html" title="谷歌撤出中国 百度不应欢喜">谷歌撤出中国 百度不应欢喜</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1498.html">http://www.muzifish.com/archives/1498.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/baidu" rel="tag">baidu</a>, <a href="http://www.muzifish.com/archives/tag/google" rel="tag">google</a>, <a href="http://www.muzifish.com/archives/tag/%e5%9c%b0%e5%9d%80" rel="tag">地址</a>, <a href="http://www.muzifish.com/archives/tag/%e5%bc%95%e6%93%8e" rel="tag">引擎</a>, <a href="http://www.muzifish.com/archives/tag/%e6%90%9c%e7%b4%a2" rel="tag">搜索</a>, <a href="http://www.muzifish.com/archives/tag/%e6%94%b6%e5%bd%95" rel="tag">收录</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1498.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>独立博客的搜索引擎收录登录地址</title>
		<link>http://www.muzifish.com/archives/1497.html</link>
		<comments>http://www.muzifish.com/archives/1497.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 06:02:22 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[baidu]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[博客]]></category>
		<category><![CDATA[搜索]]></category>
		<category><![CDATA[独立]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1497.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 一些搜索引擎除了开放网站的收录提交地址外，还针对其博客搜索专门开放了关于博客的收录提交，在博客收录提交中可以提交你的博客地址也可以提交你的博客订阅源，以下是收录登录入口地址：
&#160;&#160;&#160; 百度博客提交: http://utility.b[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1497.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 一些搜索引擎除了开放网站的收录提交地址外，还针对其博客搜索专门开放了关于博客的收录提交，在博客收录提交中可以提交你的博客地址也可以提交你的博客订阅源，以下是收录登录入口地址：</p>
<p>&#160;&#160;&#160; 百度博客提交: <a href="http://utility.baidu.com/blogsearch/submit.php">http://utility.baidu.com/blogsearch/submit.php     <br /></a>&#160;&#160;&#160; Souyo博客搜索: <a href="http://www.souyo.com/guide/addblog.htm">http://www.souyo.com/guide/addblog.htm     <br /></a>&#160;&#160;&#160; 中文Blog目录集: <a href="http://www.cnblog.org/rings/submit.asp">http://www.cnblog.org/rings/submit.asp     <br /></a>&#160;&#160;&#160; 周博通博客提交: <a href="http://www.potu.com/index">http://www.potu.com/index     <br /></a>&#160;&#160;&#160; Google博客提交：<a href="http://www.google.com/intl/zh-CN/add_url.html">http://www.google.com/intl/zh-CN/add_url.html     <br /></a>&#160;&#160;&#160; 雅虎中国博客提交：<a href="http://search.help.cn.yahoo.com/h4_4.html">http://search.help.cn.yahoo.com/h4_4.html     <br /></a>&#160;&#160;&#160; FeedSky提交博客: <a href="http://www.feedsky.com/">http://www.feedsky.com     <br /></a>&#160;&#160;&#160; 搜狗(SoGou)博客提交：<a href="http://www.sogou.com/feedback/blogfeedback.php">http://www.sogou.com/feedback/blogfeedback.php     <br /></a>&#160;&#160;&#160; 有道(YoDao)博客提交：<a href="http://tellbot.yodao.com/">http://tellbot.yodao.com/     <br /></a>&#160;&#160;&#160; Live Search博客提交：<a href="http://search.msn.com/docs/submit.aspx">http://search.msn.com/docs/submit.aspx</a></p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1498.html" title="搜索引擎网站收录提交地址">搜索引擎网站收录提交地址</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1471.html" title="创业家：Google百度和谷歌的那些事儿">创业家：Google百度和谷歌的那些事儿</a></li><li><a href="http://www.muzifish.com/archives/1463.html" title="整合Google自定义搜索到Wordpress">整合Google自定义搜索到Wordpress</a></li><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1528.html" title="每日一博的梦想">每日一博的梦想</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1474.html" title="AOL中国站疑似被挂马">AOL中国站疑似被挂马</a></li><li><a href="http://www.muzifish.com/archives/1472.html" title="关于名人博客的猜想">关于名人博客的猜想</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1497.html">http://www.muzifish.com/archives/1497.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/baidu" rel="tag">baidu</a>, <a href="http://www.muzifish.com/archives/tag/google" rel="tag">google</a>, <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e5%8d%9a%e5%ae%a2" rel="tag">博客</a>, <a href="http://www.muzifish.com/archives/tag/%e6%90%9c%e7%b4%a2" rel="tag">搜索</a>, <a href="http://www.muzifish.com/archives/tag/%e7%8b%ac%e7%ab%8b" rel="tag">独立</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1497.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux下Nginx+php+FastCGI的实现方案</title>
		<link>http://www.muzifish.com/archives/1493.html</link>
		<comments>http://www.muzifish.com/archives/1493.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:10:13 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1493.html</guid>
		<description><![CDATA[&#160;&#160;&#160; 近来闲来无事，在自己的本本上装了个VirturalBox，顺带也装了个Ubuntu Server Edition 9.10来玩一下。以前在桂电在线的时候在公家的服务器上偷偷地玩弄过apache这个软件，感觉还不错，但nginx后来居上，具有更高的负载能力，很想试[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1493.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><font face="宋体">&#160;&#160;&#160; 近来闲来无事，在自己的本本上装了个</font><a href="http://www.google.cn/url?q=http://www.virtualbox.org/&amp;ei=tsCLS_nJJM-gkQXttvRd&amp;sa=X&amp;oi=spellmeleon_result&amp;resnum=1&amp;ct=result&amp;ved=0CAYQhgIwAA&amp;usg=AFQjCNHX245FONm9vIP6R68S8nyIettXDg" target="_blank"><font face="宋体">VirturalBox</font></a><font face="宋体">，顺带也装了个<a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> Server Edition 9.10来玩一下。以前在<a href="http://news.guet.edu.cn" target="_blank">桂电在线</a>的时候在公家的服务器上偷偷地玩弄过<a href="http://httpd.apache.org" target="_blank">apache</a>这个软件，感觉还不错，但<a href="http://nginx.org" target="_blank">nginx</a>后来居上，具有更高的负载能力，很想试试。于是就趁着空闲，来玩弄一翻了。为免日后忘记，在此记下，权当笔记，也希望能够帮助有兴趣的朋友。</font></p>
<p><font face="宋体">&#160;&#160;&#160; 因为我用的是Ubuntu,所以例子是以这个系统来讲的，运用其他系统的朋友请根据具体情况来调整，在安装过程中建议全程使用ROOT帐号，方案如下：</font></p>
<p><font face="宋体">&#160;&#160;&#160; Nginx的安装。对于nginx的安装，在ubuntu中可以通过apt-get install nginx实现，也可以自行编译安装。在使用apt-get install nginx方式的情况下，nginx的目录分布情况为:</font></p>
<p><font face="宋体">&#160;&#160;&#160; </font>所有的配置文件都在/etc/nginx下,</p>
<p>&#160;&#160;&#160; 并且每个虚拟主机已经安排在了/etc/nginx/sites-available下    <br />&#160;&#160;&#160; 程序文件在/usr/sbin/nginx&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; 日志放在了/var/log/nginx中     <br />&#160;&#160;&#160; 并已经在/etc/init.d/下创建了启动脚本nginx&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; 默认的虚拟主机的目录设置在了/var/www/nginx-default </p>
<p>&#160;&#160;&#160; 自行编译安装的命令行如下：</p>
<p>&#160;&#160;&#160; wget&#160; <a title="http://nginx.org/download/nginx-0.8.33.tar.gz" href="http://nginx.org/download/nginx-0.8.33.tar.gz">http://nginx.org/download/nginx-0.8.33.tar.gz</a>     <br />&#160;&#160;&#160; tar -xzvf nginx-0.8.33.tar.gz     <br />&#160;&#160;&#160; cd nginx-0.8.33     <br />&#160;&#160;&#160; ./configure&#160; #默认的安装位置为/usr/local/nginx,可以设置prefix参数来指定安装位置，如追加&#8211;prefix=/usr表示安装到/usr目录。     <br />&#160;&#160;&#160; make &amp;&amp; make install</p>
<p>&#160;&#160;&#160; 自动编译安装配置的目录结构为：    <br />&#160;&#160;&#160; * /usr/local/nginx/conf 配置目录     <br />&#160;&#160;&#160; * /usr/local/nginx/html 默认的网站根目录     <br />&#160;&#160;&#160; * /usr/local/nginx/logs 日志和pid文件目录     <br />&#160;&#160;&#160; * /usr/local/nginx/sbin 执行文件目录</p>
<p>&#160;&#160;&#160; 至此，nginx安装基本完毕 ，通过apt-get方式安装的，可以运行sudo /etc/init.d/nginx start来运行，自行编译的一般的情况下是sudo /usr/local/nginx/sbin/nginx，具体要看安装目录。运行后就可以通过<a href="http://localhost">http://localhost</a>来查看是否成功了。</p>
<p>&#160;&#160;&#160; 安装和配置PHP及MySQL:</p>
<p>&#160;&#160;&#160; apt-get install php5-cli php5-cgi mysql-server-5.0 php5-mysql</p>
<p>&#160;&#160;&#160; 简单吧？当然，也可以自行编译安装PHP的，不过感觉比较麻烦，要自行编译安装一些运行库以及编译器，试了一下，也能成功，但有麻烦，在此就不写了。有兴趣的朋友自己去探讨吧。</p>
<p>&#160;&#160;&#160; 第三步是安装和配置FastCGI。配置FastCGI,需要用到/usr/bin/spawn-fcgi这个文件，网上很多类似的教程都是通过安装lighttpd后然后禁用lighttpd来使用 这个文件的，个人觉得很不爽。其实spawn-fcgi这个项目从09年2月的时候就独立出来了，需要使用的朋友可以通过项目的官方地址下载：<a title="http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz" href="http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz">http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz</a>，下载后正常编译安装就可以了。</p>
<p>然后是修改nginx的配置文件/usr/local/nginx/conf/nginx.conf，将“index&#160; index.html index.htm”替换为“index&#160;&#160; index.php&#160; index.htm&#160; index.html”,并且</p>
<p>去掉下面部分的注释：    <br />&#160;&#160;&#160; location ~ \.php$ {     <br />&#160;&#160;&#160; <a href="http://kangzj.net.ru/tag/fastcgi/">fastcgi</a>_pass&#160;&#160; 127.0.0.1:9000;     <br />&#160;&#160;&#160; fastcgi_index&#160; index.php;     <br />&#160;&#160;&#160; fastcgi_param&#160; SCRIPT_FILENAME&#160; /usr/local/nginx/html$fastcgi_script_name;     <br />&#160;&#160;&#160; include fastcgi_params;     <br />&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; 保存后重启nginx即可，如此linux+nginx+php+fastcgi基本上配置完成了。</p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1493.html">http://www.muzifish.com/archives/1493.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/nginx" rel="tag">nginx</a>, <a href="http://www.muzifish.com/archives/tag/php" rel="tag">php</a>, <a href="http://www.muzifish.com/archives/tag/ubuntu" rel="tag">ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1493.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>整合Google自定义搜索到Wordpress</title>
		<link>http://www.muzifish.com/archives/1463.html</link>
		<comments>http://www.muzifish.com/archives/1463.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:28:34 +0000</pubDate>
		<dc:creator>木子小鱼</dc:creator>
				<category><![CDATA[WordPress交流]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://www.muzifish.com/archives/1463.html</guid>
		<description><![CDATA[其实，网络上关于如何整合Google Custom Search到Wordpress的教程满天飞，之所以还是要发布，是权当作一个笔记，方便自己日后换主题的时候不用再在GOOGLE上搜索一遍而已，请大家不要鄙视我的这种行为哈，谢谢谅解。
以谷歌的自定义搜索取代Wordpress自带的站内搜索功能的主要[......]<p class='read-more'><a href='http://www.muzifish.com/archives/1463.html'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p>其实，网络上关于如何整合Google Custom Search到Wordpress的教程满天飞，之所以还是要发布，是权当作一个笔记，方便自己日后换主题的时候不用再在GOOGLE上搜索一遍而已，请大家不要鄙视我的这种行为哈，谢谢谅解。</p>
<p>以谷歌的自定义搜索取代Wordpress自带的站内搜索功能的主要好处概括如下：</p>
<p>1.减少数据库的查询，减轻服务负载。</p>
<p>2.加速搜索结果显示的速度。（google的搜索服务器提供的搜索结果能不快吗？）</p>
<p>3.能够提供全面的搜索，wordpress自带的搜索一般只搜索文章，而Google会搜索wordpress的目录和标签等。</p>
<p>具体的步骤如下：</p>
<p>1.添加一个页面，并且在导航中将这个页面设置为不显示。如何将其设置为不显示呢?只要在wp_list_pages()函数中用exclude将这个页面的post id剔除就可以了。</p>
<p>2. 登录到<a href="http://www.google.com/coop/cse/"> Google 自定义搜索</a>，创建你的自定义搜索。</p>
<p>3. 在输入你的基本信息和网站之后，点击“控制面板”来到代码 tab 页面。</p>
<p>4. 搜索结果托管选项选项：选择“在您的网站上托管搜索结果”，然后选择 iframe</p>
<p>5. 指定搜索结果详情：输入你第一步创建页面的页面的地址。如我的：<a title="http://www.muzifish.com/search" href="http://www.muzifish.com/search">http://www.muzifish.com/search</a></p>
<p>6. 然后用搜索框代码替换你原来的 WordPress 搜索框代码。你需要根据你自己的 WordPress 搜索框的样式对这段代码做下修改，以适合你的主题。</p>
<p>7. 编辑你第一步创建的页面，把搜索结果代码复制到该页面。你也需要对该段代码做些调整。主要是修改下 googleSearchFrameWidth = 600，把 600 修改成适合你主体的宽度。</p>
<p>8. 然后到达外观 tab 页面，在该页定义搜索框样式和搜索结果配色方案。</p>
<p>9. 如果你要整合 Google Adsense 到这个结果中来，还可以使用到赚钱这个 tab 页面，绑定你 Google Adsense 账号。</p>
<p>此方法源自我爱水煮鱼：<a title="http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/" href="http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/">http://fairyfish.net/2008/04/29/integrate-google-custom-search-into-wordpress/</a></p>
<h3  class="related_post_title">相关文章</h3><ol class="related_post"><li><a href="http://www.muzifish.com/archives/1339.html" title="关于Wordpress Google XML Sitemaps Plugin">关于Wordpress Google XML Sitemaps Plugin</a></li><li><a href="http://www.muzifish.com/archives/1523.html" title="在wordpress中获取文章图片及获得图片路径的方法">在wordpress中获取文章图片及获得图片路径的方法</a></li><li><a href="http://www.muzifish.com/archives/1497.html" title="独立博客的搜索引擎收录登录地址">独立博客的搜索引擎收录登录地址</a></li><li><a href="http://www.muzifish.com/archives/1342.html" title="Wordpress Blogger新手必备插件推荐">Wordpress Blogger新手必备插件推荐</a></li><li><a href="http://www.muzifish.com/archives/1581.html" title="WordPress建博方案解析">WordPress建博方案解析</a></li><li><a href="http://www.muzifish.com/archives/1561.html" title="Windows下让Nginx+PHP以系统服务方式启动">Windows下让Nginx+PHP以系统服务方式启动</a></li><li><a href="http://www.muzifish.com/archives/1530.html" title="WordPress博客搬迁及域名相关方案">WordPress博客搬迁及域名相关方案</a></li><li><a href="http://www.muzifish.com/archives/1506.html" title="windows平台下nginx+php的安装配置">windows平台下nginx+php的安装配置</a></li><li><a href="http://www.muzifish.com/archives/1498.html" title="搜索引擎网站收录提交地址">搜索引擎网站收录提交地址</a></li><li><a href="http://www.muzifish.com/archives/1474.html" title="AOL中国站疑似被挂马">AOL中国站疑似被挂马</a></li></ol><p><small>Copyright © 2009-2010 <a href="http://www.muzifish.com">MuziFish.COM</a> . |
原文地址：<a href="http://www.muzifish.com/archives/1463.html">http://www.muzifish.com/archives/1463.html</a>
<br/>
标签: <a href="http://www.muzifish.com/archives/tag/google" rel="tag">google</a>, <a href="http://www.muzifish.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://www.muzifish.com/archives/tag/%e7%ac%94%e8%ae%b0" rel="tag">笔记</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.muzifish.com/archives/1463.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
