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的默認索引頁面! –