在WAMP中不同端口上的虚拟主机

时间:2015-10-26 12:16:22

标签: apache virtualhost wampserver

我正在尝试使用wamp设置虚拟主机。我从tutorial开始遵循的说明。

这就是我将directoryVirtualHost代码添加到apache` httpd-vhosts.conf文件中的方法。

<Directory C:/Users/myName/projects>
    Order Deny,Allow   
    Allow from all 
</Directory>

<VirtualHost *:8000>   
    DocumentRoot "C:/Users/myName/projects/myFirst" 
    ServerName mysite.local 
</VirtualHost>

我也没有注释: Include conf/extra/httpd-vhosts.conf文件中的httpd.conf

但是当我尝试使用我的虚拟服务器名称打开我的网页时,它不会进入mypage。

注意:我已将默认端口更改为8000以访问localhost服务器。 像这样的Localhost URL - http://localhost:8000/

更新 来自apache-error.log档案:

[Mon Oct 26 17:48:12.935427 2015] [mpm_winnt:notice] [pid 5432:tid 384] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 26 17:48:15.196556 2015] [mpm_winnt:notice] [pid 3344:tid 308] AH00364: Child: All worker threads have exited.
[Mon Oct 26 17:48:18.216729 2015] [mpm_winnt:notice] [pid 5432:tid 384] AH00430: Parent: Child process 3344 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Mon Oct 26 17:48:31.249474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations

[Mon Oct 26 17:48:31.249474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Mon Oct 26 17:48:31.249474 2015] [core:notice] [pid 3556:tid 400] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Mon Oct 26 17:48:31.252474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00418: Parent: Created child process 3744
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Mon Oct 26 17:48:32.228530 2015] [mpm_winnt:notice] [pid 3744:tid 324] AH00354: Child: Starting 64 worker threads.

有谁能告诉我这有什么不对吗?

0 个答案:

没有答案