【发布时间】:2011-02-06 05:06:43
【问题描述】:
在使用 AJP 代理到 Tomcat 时,我无法为我的 Windows 计算机创建子域。这是我的 httpd.conf 文件中的内容:
<VirtualHost *:80>
ServerName subdomain.localhost
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/folder/
ProxyPassReverse / ajp://localhost:8009/folder/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
子域已添加到`c:\windows\system32\drivers\etc\hosts
127.0.0.1 本地主机
127.0.0.1 subdomain.localhost
当我去http://localhost 时,我直接去代理。当我去http://subdomain.localhost 时,我也会去代理。我该怎么做才能让子域只去代理,而常规去Apache?
【问题讨论】:
标签: apache tomcat proxy subdomain ajp