【发布时间】:2012-07-15 17:45:02
【问题描述】:
我有 2 个网站正在尝试使用 Apache Vhost 进行设置。网站设置在 IP 地址/文件夹名称,但尚未对外暴露,没有 DNS。因此,当我尝试像这样对它们进行虚拟主机时:
<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,我收到错误"The requested URL /redcreek/ was not found on this server." 一旦我激活了 Vhost 配置文件,就无法识别 IP 地址。
在我注册 DNS 名称之前,是否可以通过这种方式配置 httpd-vhosts.conf?
【问题讨论】:
标签: apache httpd.conf vhosts