访问Apache的虚拟主机,从局域网络上的计算机? [英] Access Apache VirtualHost from any computer on LAN?
问题描述
我在httpd.conf
I have wamp setup with quite a few websites setup as virtual hosts like this in httpd.conf
<VirtualHost 127.0.0.1>
ServerName project1.local
DocumentRoot "c:/wamp/project1/"
</VirtualHost>
我在WAMP机的主机文件这些输入和我可以访问他们的机器上就好了。
I have these input in the wamp machine's host file and I can access them just fine on that machine.
127.0.0.1 project1.local
然而,当我尝试把一个条目我OSX机器上(192.168.1.101作为WAMP机的内部IP),它不会拉一页。
However, when I try to put an entry on my OSX machine as (192.168.1.101 being the internal ip of the wamp machine) it won't pull the page up.
192.168.1.101 project1.local
有没有别的东西,我需要做的,使从其他机器这项工作?谢谢!
Is there something else I need to do to make this work from other machines? Thanks!
推荐答案
您要么需要&LT;虚拟主机192.168.1.101&GT;
(除127.0.0.1)或者简单地使用&LT;虚拟主机*方式&gt;
把VH上的所有地址
You either need <VirtualHost 192.168.1.101>
(in addition to 127.0.0.1), or simply use <VirtualHost *>
to put the VH on all addresses.
这篇关于访问Apache的虚拟主机,从局域网络上的计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!