I have a domain name e.g. example.com and its pointed to a jboss server
When i accessing https://example.com, its working fine.
The application is deployed in root path.(i.e. context-root is "/")
its pointed to a jboss server through apache proxy.
<VirtualHost *:443>
ServerName example.com
ServerAlias example.com
SSLProxyEngine on
SSLProxyCheckPeerCN on
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
ProxyPass / https://10.xx.0.6:8443/
ProxyPassReverse / https://10.xx.0.6:8443/
...
</VirtualHost>
Another web app ("otherapp") is deployed on the same jboss server. context-root is "/otherapp" Then i want to access the web app through the url like this "https://example.com/otherapp/" or "https://otherapp.example.com/"
is it possible?
You can use apache's <Location> directive
...
<Location /otherapp>
ProxyPass https://10.xx.0.6:8443/
ProxyPassReverse https://10.xx.0.6:8443/
</Location>
More help here: Is it possible to use relative path in ProxyPass/ProxyPassReverse?
Apache docs (take note of the trailing slash): https://httpd.apache.org/docs/2.4/mod/core.html#location