我有2个网站我正在尝试使用Apache Vhost进行设置。这些网站设置为IP地址/文件夹名称,但尚未公开到外部,没有DNS。所以,当我尝试VHOST他们是这样的:我可以像这样使用Apache 2.2.22来设置虚拟主机配置吗?
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/marion"
ServerName IP-address/marion
<Directory "c:/wamp/www/marion">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/redcreek"
ServerName IP-address/redcreek
<Directory "c:/wamp/www/redcreek">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
并浏览到任何网站,如IPaddress/redcreek
,我得到它像IP地址不能被识别的错误"The requested URL /redcreek/ was not found on this server."
一旦我激活的虚拟主机配置文件。
是否可以通过这种方式配置httpd-vhosts.conf
直到我注册了DNS名称?
谢谢,这很好。 – jamesTheProgrammer 2012-07-17 19:29:23