I have two applications running on Jboss 6 with a different context on the same port (8180). My Apache is running on port 80 of the computer. I need to direct the request to the appropriate context based on access to the application.
I have a dns entry - testServ14, which points to the IP address of the server.
To be more understandable, applications must be accessible through URLs such as
http: // testServ14 / appAcontext /
http: // testServ14 / appBcontext /
In the httpd-vhosts file, what should I use virtualhost or namevirtualhost directives?
How can i achieve this.
I tried the following, but did not work ...
<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>
thank
source
share