日期:2014-05-16 浏览次数:20783 次
127.0.0.1 localhost 127.0.0.2 ci
<VirtualHost 127.0.0.1:80> DocumentRoot "D:/wamp/www/localhost" ServerName 127.0.0.1:80 </Virtualhost> <Directory "D:/wamp/www/localhost"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> <VirtualHost 127.0.0.2:80> DocumentRoot "D:/wamp/www/ci" ServerName 127.0.0.2:80 </Virtualhost> <Directory "D:/wamp/www/ci"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.2 </Directory>
//第一处,这里的IP,要在hosts存在 <VirtualHost 127.0.0.2:80> //第二处,目录 DocumentRoot "D:/wamp/www/ci" //第三处,IP,跟第一处要一样 ServerName 127.0.0.2:80 </Virtualhost> //第四处,目录,跟第二处一样 <Directory "D:/wamp/www/ci"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all //第五处,IP,与一,三处一致,但不包括端口号。 Allow from 127.0.0.2 </Directory>