更新說明點虛擬主機不同的內部地址
我有一個虛擬主機設置在服務器上。當您從外部IP連接到我們的服務器時,下面的設置工作正常。所以我可以達到http://subdomain.ourcompany.com/index.php
沒有任何問題,只要我使用我的手機或任何其他外部IP地址。
現在我想要使用我們在192.168.0.0範圍內的內部服務器地址來訪問這個特定的虛擬主機。所以我想輸入類似http://192.168.0.100:10002/index.php
的東西,併到達同一頁面,而我在一臺機器上,例如本地地址爲192.168.0.106。
已經嘗試過
我經歷了所有的文件和相關的問題,閱讀和使用ProxyPass指令(不知道如果我理解正確的話),我試圖改變我的主機我的本地計算機上的文件試過,我試着設置使用內部服務器地址(使用)啓用基於IP的虛擬主機。後者部分成功,我可以訪問服務器。但是不可能使用,因爲有多個命名虛擬主機處於活動狀態,並且會導致它們無法訪問,因爲特定IP位於通配符*之前。
這是我的設置到目前爲止。你能發現我的錯誤嗎? 目前任何解決方案都可以讓虛擬主機在內部可以訪問而不會混淆其他虛擬主機,這將是一個很好的解決方案。
當前設置
<VirtualHost *:80>
DocumentRoot /home/userx/public_html
ServerName subdomain.ourcompany.com
ServerAdmin [email protected]
DirectoryIndex index.php
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/userx/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass/http://localhost:10002/
ProxyPassReverse/http://localhost:10002/
</VirtualHost>
我試着澄清我的文字。 – titusn