虚拟无法在其他系统 wamp 中工作
虚拟主机无法在网络中工作
我刚刚遵循了此站点教程, 虚拟主机步骤 该教程非常好,但是当我在另一个系统中尝试这个别名 URL 时,它不起作用。我已经检查了我的其他系统,我能够看到我的应用程序,在进行这些更改后,我无法在其他系统上看到我的应用程序。
我什至将允许从 127.0.0 更改为全部,但这不起作用。
我的 C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf 这是我添加的内容
<VirtualHost *:80>
ServerAdmin webmaster@developertalk
DocumentRoot "C:/wamp/www/developertalk"
ServerName developertalk
ServerAlias www.developertalk
ErrorLog "logs/developertalk-error.log"
CustomLog "logs/developertalk-access.log" common
<directory "C:/wamp/www/developertalk">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from all
</directory>
</VirtualHost>
当在另一个系统中点击 URL 时,出现以下错误:
Server not found
在我的本地主机中,我有 3 个 Web 应用程序。
由于上述更改,我的本地主机其他网站无法正常工作。
如何使其适用于其他网站。
Virtual host not working in the NETWORK
I just followed this site tutorial,
Virtual host steps
The tutorial was excellent but when I try this alias URL in another system, its not working. I have checked in my other system, I am able to see my application, after I did these changes I am not able to see my application on the other system.
I have even changed Allow from 127.0.0 to all but that is not working.
My C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf
This what I added
<VirtualHost *:80>
ServerAdmin webmaster@developertalk
DocumentRoot "C:/wamp/www/developertalk"
ServerName developertalk
ServerAlias www.developertalk
ErrorLog "logs/developertalk-error.log"
CustomLog "logs/developertalk-access.log" common
<directory "C:/wamp/www/developertalk">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from all
</directory>
</VirtualHost>
When hitting URL in another system, getting following error:
Server not found
In my local host i am having 3 web application.
Due to above changes my local host other sites not working.
How to make it work other sites.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要使用本地 DNS 来表示网络中的每台 PC,即您的 PC 主机上有“myApp”,您还可以向每个客户端的主机文件中添加类似
myapp 192.168.1.2
的内容,其中 192.168. 1.2 您的网络静态IPYou need to use local DNS to say every PC in Your network, that You have on Your PC host 'myApp', also You can add to every client's hosts file something like
myapp 192.168.1.2
where 192.168.1.2 Your static IP in network对于您想要访问 http://developertalk 的每台计算机,您需要编辑每台计算机中的 Hosts 文件。
位于 (xp/win7): C:\Windows\System32\drivers\etc\
您只需在每台计算机上添加 1 行。
例如:
您可以通过打开 cmd 并输入 ipconfig 来检查 Windows 上的内部 IP 地址。
在“以太网适配器本地连接”列下查找 IPv4 地址。
如果您没有为您的计算机请求或分配静态内部 IP,其他人将无法连接到 http://developertalk已转发到您的旧内部 IP。
叶戈尔·萨扎诺维奇实际上已经回答了您的问题并为您提供了额外的信息,因此如果这有帮助的话,请接受他的而不是这个。
For every computer you want to have access to http://developertalk, you need to edit the Hosts file in each one.
Located at (xp/win7): C:\Windows\System32\drivers\etc\
You need to add only 1 line on every computer.
example:
you can check your internal ip address on your windows by opening cmd and typing ipconfig.
Look for the IPv4 address under the Ethernet adapter Local Area Connection column.
If you don't request or assign a static internal IP to your computer, others will not be able to connect to http://developertalk which was forwarded to your old internal IP.
Egor Sazanovich has actually answered your question and provided you with extra information, so accept his instead of this one, if this helped at all.