[英]Adding localhost subdomains in apache virtual hosts
我正在嘗試將溫室的所有子域重定向到“溫室\\測試站點”,但無法使其正常工作。
我不了解DocumentRoot和VirtualDocumentRoot之間的區別,不確定是否有任何區別。
任何想法,為什么它不工作'testsite.hothouse'重定向很好。 'test.hothouse'或任何subdomain.hothouse都不(重定向到'www.subdomain.hothouse')。
我已經花了一整天的時間來解決這個問題,我已經清除了所有瀏覽器緩存。 順便說一句我正在使用WAMP
DocumentRoot "D:\wamp\www"
<Directory "D:\wamp\www">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "D:\wamp\www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
ServerName testsite.hothouse
ServerAlias test.hothouse
</VirtualHost>
<VirtualHost *:80>
VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
ServerName subdomain.hothouse
ServerAlias *.hothouse
</VirtualHost>
問題不是apache設置,但是我沒有更新Windows主機文件以重定向到localhost。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.