I have a vServer with debian 7.8 (wheezy), apache2 webserver and tomcat7.
I deployed a webapp with the apache www.mydomain.com/manager
app into /var/lib/tomcat7/webapps/app/
which runs perfectly under www.mydomain.com:8080
. It gets linked to my webapp´s welcome page www.mydomain.com:8080/app/#welcome
.
My apache2 www.mydomain.com/host-manager
lists only “localhost” under host name.
Now I want to connect my apache2 webserver to tomcat7, so that www.mydomain.com
starts my webapp (like www.mydomain.com/#welcome
).
Things, i have done so far:
- enabled proxy_http, which can be found under
/etc/apache2/mods-enabled/proxy_http.load
my
/etc/apache2/sites-enabled/000-default
file looks like<VirtualHost *:80> ServerName www.mydomain.com ServerAlias mydomain.com ProxyRequest Off ProxyPreserveHost On <Proxy*> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReserve / http://localhost:8080/ DocumentRoot /var/lib/tomcat7/webapps/app/ </VirtualHost>
changed
/etc/hosts
127.0.0.1 localhost
to127.0.0.1 www.mydomain.com
my
/etc/tomcat7/server.xml
looks like<Server port=”8005” shutdown=”SHUTDOWN”> ... <Connector port=”8080” protocol=”HTTP/1.1” ... redirectPort=”8443” proxyPort=”80” proxyName=”www.mydomain.com” />
What am i missing?
ProxyPassReserve /
andhttp://loclhost
... – andpeiwww.mydomain.com
i get the standard apache2 site,www.mydomain.com:8080
gives me the standard tomcat site andwww.mydomain.com:8080/app
gives me my webapp-starting-page – Frank