<?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>Tairan's Story &#187; Apache</title>
	<atom:link href="http://www.tairan.net/index.php/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tairan.net</link>
	<description>「知之真切笃实处即是行。行之明觉精察处即是知，知行工夫不可离。」</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:12:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>妙用Apache虚拟主机</title>
		<link>http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/</link>
		<comments>http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 13:40:03 +0000</pubDate>
		<dc:creator>Daniel Wang</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[我的声音]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.tairan.net/?p=576</guid>
		<description><![CDATA[From Tairan&#8217;s Story, post 妙用Apache虚拟主机 如果在本地要同时测试多个网站, 通过子目录的方式访问有些不方便. 而只通过IP地址访问则无法同时访问多个站点. 这里我们就通过httpd server的虚拟主机功能和修改本地DNS文件来模拟通过域名来访问本地的多个测试站点. 这里以apache2为例, 其他的httpd server只要支持虚拟主机也可以使用这样的方法. 首先修改本地DNS解析文件,这样我们就可以通过域名来访问本地站点. Windows: 1 C:\windows\system32\drivers\etc\hosts Linux: ubuntu, fedora 1 /etc/hosts 增加新的解析如: 1 2 3 #ip                         url 192.168.1.1       www.tairan.net 192.168.1.1 www.51xna.com Note: 这里的域名要跟虚拟主机配置中的ServerName保持一致 基于ServerName的虚拟主机配置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 NameVirtualHost     *:80 &#60;VirtualHost *:80&#62; ServerName [...]]]></description>
			<content:encoded><![CDATA[<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/">妙用Apache虚拟主机</a></p>
</div>
<p>如果在本地要同时测试多个网站, 通过子目录的方式访问有些不方便. 而只通过IP地址访问则无法同时访问多个站点. 这里我们就通过httpd server的虚拟主机功能和修改本地DNS文件来模拟通过域名来访问本地的多个测试站点.</p>
<p>这里以apache2为例, 其他的httpd server只要支持虚拟主机也可以使用这样的方法.</p>
<p>首先修改本地DNS解析文件,这样我们就可以通过域名来访问本地站点. </p>
<p>Windows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="batch" style="font-family:monospace;">C:\windows\system32\drivers\etc\hosts</pre></td></tr></table></div>

<p>Linux: ubuntu, fedora</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre></td></tr></table></div>

<p>增加新的解析如:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#ip                         url</span>
192.168.1.1       www.tairan.net
192.168.1.1       www.51xna.com</pre></td></tr></table></div>

<p>Note: 这里的域名要跟虚拟主机配置中的ServerName保持一致</p>
<p><strong>基于ServerName的虚拟主机配置</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">NameVirtualHost     *:80
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        ServerName www.tairan.net
        ServerAdmin    webmaster@tairan.net
        DocumentRoot /var/www/tairan.net
        ErrorLog  logs/tairan.net-error_log
        CustomLog logs/tairan.net-access_log common
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        ServerName www.51xna.com
        ServerAdmin webmaster@51xna.com
        DocumentRoot /var/www/51xna.com
        ErrorLog logs/51xna.com-error_log
        CustomLog logs/51xna.com-access_log common
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>设置完毕, 重启apache. 然后就可以通过我们指定的域名来访问在本地的网站了. </p>
<p>另外虚拟主机还可以基于IP设置, 在这里并不适合我们使用.</p>
<p>其他关于虚拟主机的配置参见 <a href="http://httpd.apache.org" target="_blank">Apache document</a>
<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/">妙用Apache虚拟主机</a></p>
</div>
<hr />
<p><small>© Daniel Wang for <a href="http://www.tairan.net">Tairan's Story</a>, 2009. |
<a href="http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/">Permalink</a> |
<a href="http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/&title=妙用Apache虚拟主机">del.icio.us</a>
<br/>
Post tags: <a href="http://www.tairan.net/index.php/tag/apache/" rel="tag">Apache</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tairan.net/index.php/2009/08/30/the-tips-of-apache-virtualhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t up-to-date</title>
		<link>http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/</link>
		<comments>http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 09:26:07 +0000</pubDate>
		<dc:creator>Daniel Wang</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Thinking]]></category>
		<category><![CDATA[我的声音]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://blog.tairan.org/?p=228</guid>
		<description><![CDATA[From Tairan&#8217;s Story, post Don&#8217;t up-to-date 不要最新的！ 貌似很多程序员都喜欢尝新，不停的追赶这语言那技术。此时之前，我也是其中的一份子，而且还比较狂热。这几天遇到的一些事情让我懂得，最新的不一定是最合适的。 说说是什么事情让我停止狂热的追赶最新的东西吧： 现在Python 3.0 已经发布一段时间了，并且大叔告诉我们现在还有很多周边软件没有跟上，所以除非是新项目，还是保守点选择2.6 比较合适。于是乎，就选择2.6.1吧 谁知 安装 trac 以及相关软件的时候，有个装不上，&#62;_&#60; 因为忘记记录存档想不起是哪个软件了，真对不起自己和大家！ 再说说Apache吧，一直都选择2.2.x来玩，搭建SVN服务器等。CollabNet 做的集成包真的很好用，安装也简单！可用这个Apache2.2 安装 MOD_SCGI 却死活启动不了服务，从Google的结果来看，虽然有人提出自己编译MOD_SCGI for Apache 2.2，可也是意淫了一下说：“应该很容易”，&#8211; 谁不知道在Windows 上玩这些成本有多高！ 无奈退而求其次，有换了个Apache2.0.x用用。 盲目的求新会走很多弯路。不过也能获得一些经验！ 兰迪教授说：当得不到想得到的东西时，就得到了经验。 虽说不要最新的，也没说一直守旧不前进，使用开源软件时最好用当前版本的前一个次版本最佳。 一来是软件经过了一段时间的考验，二是周边的软件也都跟上了。不至于走两步退一步。 =========================== Trac + Apache + SCGI 的安装方法比较容易，性能稳定方面自己倒是没有测试过。主要参考了这篇文章 Subversion无痛起步 &#8212; Trac 0.10b1 + Apache 2 From Tairan&#8217;s Story, post Don&#8217;t up-to-date © Daniel [...]]]></description>
			<content:encoded><![CDATA[<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/">Don&#8217;t up-to-date</a></p>
</div>
<p><strong>不要最新的！</strong></p>
<p>貌似很多程序员都喜欢尝新，不停的追赶这语言那技术。此时之前，我也是其中的一份子，而且还比较狂热。这几天遇到的一些事情让我懂得，最新的不一定是最合适的。</p>
<p>说说是什么事情让我停止狂热的追赶最新的东西吧：<br />
现在Python 3.0 已经发布一段时间了，并且大叔告诉我们现在还有很多周边软件没有跟上，所以除非是新项目，还是保守点选择2.6 比较合适。于是乎，就选择2.6.1吧<br />
谁知 安装 trac 以及相关软件的时候，有个装不上，&gt;_&lt; 因为忘记记录存档想不起是哪个软件了，真对不起自己和大家！</p>
<p>再说说Apache吧，一直都选择2.2.x来玩，搭建SVN服务器等。CollabNet 做的集成包真的很好用，安装也简单！可用这个Apache2.2 安装 MOD_SCGI 却死活启动不了服务，从Google的结果来看，虽然有人提出自己编译MOD_SCGI for Apache 2.2，可也是意淫了一下说：“应该很容易”，&#8211; 谁不知道在Windows 上玩这些成本有多高！<br />
无奈退而求其次，有换了个Apache2.0.x用用。</p>
<p><span style="background-color:yellow"><strong>盲目的求新会走很多弯路</strong>。</span>不过也能获得一些经验！ 兰迪教授说：<span style="background-color:yellow">当得不到想得到的东西时，就得到了经验。</span></p>
<p>虽说不要最新的，也没说一直守旧不前进，使用开源软件时最好用当前版本的前一个次版本最佳。 一来是软件经过了一段时间的考验，二是周边的软件也都跟上了。不至于走两步退一步。</p>
<p>===========================<br />
Trac + Apache + SCGI 的安装方法比较容易，性能稳定方面自己倒是没有测试过。主要参考了这篇文章 <a href="http://onezstudio.blogspot.com/2006/09/getting-started-with-subversion-trac.html">Subversion无痛起步 &#8212; Trac 0.10b1 + Apache 2</a>
<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/">Don&#8217;t up-to-date</a></p>
</div>
<hr />
<p><small>© Daniel Wang for <a href="http://www.tairan.net">Tairan's Story</a>, 2009. |
<a href="http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/">Permalink</a> |
<a href="http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/&title=Don&#8217;t up-to-date">del.icio.us</a>
<br/>
Post tags: <a href="http://www.tairan.net/index.php/tag/apache/" rel="tag">Apache</a>, <a href="http://www.tairan.net/index.php/tag/python/" rel="tag">python</a>, <a href="http://www.tairan.net/index.php/tag/thinking/" rel="tag">Thinking</a>, <a href="http://www.tairan.net/index.php/tag/trac/" rel="tag">trac</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tairan.net/index.php/2009/02/13/dont-up-to-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2 + Subversion 配置备忘</title>
		<link>http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/</link>
		<comments>http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 03:02:00 +0000</pubDate>
		<dc:creator>Daniel Wang</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[我的声音]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://tairan.wordpress.com/2008/06/03/apache2-subversion-%e9%85%8d%e7%bd%ae%e5%a4%87%e5%bf%98/</guid>
		<description><![CDATA[From Tairan&#8217;s Story, post Apache2 + Subversion 配置备忘 http.conf#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;# 路径可以使用绝对路径，也可以使用apache的相对路径。使用绝对路径时注意转义字符，建议使用/LoadModule dav_svn_module &#8220;D:/Subversion/bin/mod_dav_svn.so&#8221;LoadModule authz_svn_module &#8220;D:/Subversion/bin/mod_authz_svn.so&#8221;#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; DAV svn SVNParentPath &#8220;D:/Subversion/Repository&#8221; #仓库路径AuthType Basic AuthName &#8220;Subversion Repository of Hacker&#8217;s Story&#8221; AuthUserFile &#8220;D:/Subversion/passwd&#8221; #使用apache htpasswd 程序生成用户名密码AuthzSVNAccessFile &#8220;D:/Subversion/accesspolicy&#8221; #用户分组和权限管理Satisfy Any Require valid-user accesspolicy[groups]admin = daniel #分组 [/]* = r #指定版本库，支持多个版本库设置@admin = rw #权限控制 From Tairan&#8217;s Story, post Apache2 + Subversion 配置备忘 [...]]]></description>
			<content:encoded><![CDATA[<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/">Apache2 + Subversion 配置备忘</a></p>
</div>
<p>http.conf<br />#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br /># 路径可以使用绝对路径，也可以使用apache的相对路径。使用绝对路径时注意转义字符，建议使用/<br />LoadModule dav_svn_module &#8220;D:/Subversion/bin/mod_dav_svn.so&#8221;LoadModule authz_svn_module &#8220;D:/Subversion/bin/mod_authz_svn.so&#8221;<br />#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>DAV svn <br />SVNParentPath &#8220;D:/Subversion/Repository&#8221;  #仓库路径<br />AuthType Basic <br />AuthName &#8220;Subversion Repository of Hacker&#8217;s Story&#8221; <br />AuthUserFile &#8220;D:/Subversion/passwd&#8221; #使用apache htpasswd 程序生成用户名密码<br />AuthzSVNAccessFile &#8220;D:/Subversion/accesspolicy&#8221;  #用户分组和权限管理<br />Satisfy Any <br />Require valid-user</p>
<p>accesspolicy<br />[groups]<br />admin = daniel #分组</p>
<p>[/]* = r #指定版本库，支持多个版本库设置<br />@admin = rw #权限控制
<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/">Apache2 + Subversion 配置备忘</a></p>
</div>
<hr />
<p><small>© Daniel Wang for <a href="http://www.tairan.net">Tairan's Story</a>, 2008. |
<a href="http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/">Permalink</a> |
<a href="http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/&title=Apache2 + Subversion 配置备忘">del.icio.us</a>
<br/>
Post tags: <a href="http://www.tairan.net/index.php/tag/apache/" rel="tag">Apache</a>, <a href="http://www.tairan.net/index.php/tag/subversion/" rel="tag">subversion</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tairan.net/index.php/2008/06/03/apache2-subversion-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
