apache2 - Set up apache reverse proxy for different apps in tomcat -
i have 2 apps in tomcat. set reverse proxy 1 of them. app folder test. problem when hit url app, /test added url. below configuration file reverse proxy in sites-available folder:
test.eunice.lan
<virtualhost *:80> serveradmin webmaster@localhost servername test.eunice.lan proxypreservehost on proxyrequests off proxypass / http://localhost:8080/test/ proxypassreverse / http://localhost:8080/test/ </virtualhost>
your proxypass configuration going lead mass confusion because url prefix not same context path. better:
proxypass /test/ http://localhost:8080/test/ if don't want add /test beginning of url, should re-name test.war root.war (or exploded-war directory test/ -> root/) (case-sensitive, on case-insensitive filesystems).
if have two webapps you'll want separate them url prefix (e.g. /test , /dev otherwise end jsessionid cookie-confusion, assuming using cookie-based sessions in both web applications.
Comments
Post a Comment