<?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; apache，ip</title>
	<atom:link href="http://www.iphpmysql.cn/tag/apache%ef%bc%8cip/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iphpmysql.cn</link>
	<description>存着IT的理性,掺杂文学的浪漫…</description>
	<lastBuildDate>Fri, 06 Jan 2012 00:44:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>apache禁止使用IP访问的实现方法</title>
		<link>http://www.iphpmysql.cn/apache%e7%a6%81%e6%ad%a2%e4%bd%bf%e7%94%a8ip%e8%ae%bf%e9%97%ae%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95.html</link>
		<comments>http://www.iphpmysql.cn/apache%e7%a6%81%e6%ad%a2%e4%bd%bf%e7%94%a8ip%e8%ae%bf%e9%97%ae%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95.html#comments</comments>
		<pubDate>Thu, 25 Dec 2008 19:37:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网海拾贝]]></category>
		<category><![CDATA[apache，ip]]></category>
		<category><![CDATA[访问]]></category>

		<guid isPermaLink="false">http://www.iphpmysql.cn/?p=106</guid>
		<description><![CDATA[用apache搭建的WEB服务器，如何让用户只能通过设定的域名访问，而不能直接通过服务器的IP地址访问呢？百度了一下有几个方法,没有试验过. 方法一：在httpd.conf文件最后面，加入以下代码 NameVirtualHost 221.*.*.* ServerName 221.*.*.* Order Allow,Deny Deny from all DocumentRoot “c:/web” ServerName www.xxx.com 　　　　　 说明：蓝色部分是实现拒绝直接通过221.*.*.*这个IP的任何访问请求，这时如果你用221.*.*.*访问，会提示拒绝访问。红色部分就是允许通过www.xxx.com这个域名访问，主目录指向c:/web（这里假设你的网站的根目录是c:/web） 方法二：在httpd.conf文件最后面，加入以下代码 NameVirtualHost 221.*.*.* DocumentRoot “c:/test” ServerName 221.*.*.* DocumentRoot “c:/web” ServerName www.xxx.com 说明：蓝色部分是把通过221.*.*.*这个IP直接访问的请求指向c:/test目录下，这可以是个空目录，也可以在里面建一个首页文件，如index.hmtl，首面文件内容可以是一个声明，说明不能通过IP直接访问。红色部分的意思跟方法一是一样的。 注：修改后要重启apache 方法三：建一个虚拟主机， ServerName IPAddress (比如192.168.0.1) DocumentRoot /usr/local/apache/nosite/ 这样就可以了。 在/usr/local/apache/nosite/下面建一个index.htm，提示用户，不允许IP访问。或其它出错信息。 方法四： ServerName IPAddress (比如192.168.0.1) DocumentRoot /usr/local/apache/nosite/ Order deny,allow Deny from all]]></description>
		<wfw:commentRss>http://www.iphpmysql.cn/apache%e7%a6%81%e6%ad%a2%e4%bd%bf%e7%94%a8ip%e8%ae%bf%e9%97%ae%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

