0
我在我的服务器上配置了2个虚拟主机(servername.dyndns.org)。 如何从外部LAN访问?多个虚拟主机apache:从外部局域网访问?
这是我的配置:
1虚拟主机
<VirtualHost *:80>
ServerName website1.local
DocumentRoot /var/www/website1
DirectoryIndex index.html index.php
<Directory "/var/www/website1">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
第二个虚拟主机
<VirtualHost *:80>
ServerName website2.local
DocumentRoot /var/www/website2
DirectoryIndex index.html index.php
<Directory "/var/www/website2">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
文件主机
127.0.0.1 localhost
127.0.0.1 website1.local
127.0.0.1 website2.local
在局域网内部,我可以访问单个虚拟主机数字化网站1.local或website2.local。在外面,如果我的数字servername.dyndns.org,我到达了Apache的默认欢迎索引或主机文件中的最后一个!
感谢。
是您使用的网址以达到从LAN之外的那些服务器? –
servername.dyndns.org,但我只达到了Apache的默认索引页面! –