【问题标题】:How to setup virtual host in zend apache2.4 and window 7?如何在zend apache2.4 和window 7 中设置虚拟主机?
【发布时间】:2018-10-16 19:56:57
【问题描述】:

我在本地设置虚拟主机但没有成功。请帮我检查一下。

服务器本地信息。 Zend apache2.4 系统:窗口 7。

我的配置: httpd.conf 文件内容:

....
include  extra/httpd-vhost.conf
....

文件 httpd-vhost.conf:

<VirtualHost *:80>
     ServerAdmin girl.test
     DocumentRoot "C:\localhost\source"
     ServerName girl.test
     ServerAlias www.girl.test
     ErrorLog "logs\girl-error.log"
     CustomLog "logs\girl-access.log" common
 </VirtualHost>

 <VirtualHost *:80>
     ServerAdmin boy.test
     DocumentRoot "C:\localhost\source"
     ServerName boy.test
     ErrorLog "logs\boy-error.log"
     CustomLog "logs\boy-access.log" common
 </VirtualHost>

文件:etc/hosts 我加了两行

127.0.0.1/source girl.test
127.0.0.1/source boy.test

在我重新启动服务并转到:

  • girl.test 获取消息

无法访问该站点 girl.test 的服务器 IP 地址无法访问 找到了。

  • 127.0.0.1/source 工作正常。

请帮我检查一下,非常感谢。

【问题讨论】:

    标签: windows apache localhost zend-server


    【解决方案1】:

    我已经解决了将文件 etc/hosts 更改为 127.0.0.1 girl.test 127.0.0.1 boy.test 时的问题

    【讨论】:

      猜你喜欢
      • 2016-04-17
      • 2014-05-14
      • 2016-02-27
      • 2011-01-23
      • 2021-08-30
      • 2016-11-09
      • 1970-01-01
      • 1970-01-01
      • 2014-05-28
      相关资源
      最近更新 更多