我在Jboss 6上运行了两个不同context的应用程序,它们共享同一个端口(8180)。我在机器端口80上运行了Apache。我需要根据所访问的应用程序来定向请求到适当的context。
我有一个dns条目-testServ14,它指向服务器IP。
更明确地说,应用程序应该通过以下URL访问: http://testServ14/appAcontext/ http://testServ14/appBcontext/ 在httpd-vhosts文件中,我应该使用virtualhost还是namevirtualhost指令?
我该如何实现这一点...
尝试了以下方法但未成功...
我有一个dns条目-testServ14,它指向服务器IP。
更明确地说,应用程序应该通过以下URL访问: http://testServ14/appAcontext/ http://testServ14/appBcontext/ 在httpd-vhosts文件中,我应该使用virtualhost还是namevirtualhost指令?
我该如何实现这一点...
尝试了以下方法但未成功...
<VirtualHost *:80>
ServerName http://testServ14/appA
ProxyRequests Off
ProxyVia On
ProxyPass / http://localhost:8180/appA
ProxyPassReverse / http://localhost:8180/appA
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>
<VirtualHost *:80>
ServerName http://testServ14/appB
ProxyRequests Off
ProxyVia On
ProxyPass / http://localhost:8180/appB
ProxyPassReverse / http://localhost:8180/appB
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>
谢谢