Domain to apache, subdomain or subdirectory to tomcat
Posted
by
hofmeister
on Server Fault
See other posts from Server Fault
or by hofmeister
Published on 2012-09-08T18:03:54Z
Indexed on
2012/09/08
21:39 UTC
Read the original article
Hit count: 368
I set up an Apache2.2
and Tomcat7
Windows Server. Now I would like to use the domain for the apache and a subdomain or a subdirectory for the tomcat webapps. But I don’t know how to configure the httpd.conf
.
At the moment the httpd.conf
looks like:
<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>
<IfModule mod_jk.c>
JkWorkersFile conf/workers.jetty.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat
</IfModule>
<VirtualHost servername:*>
ServerName servername
ServerAdmin [email protected]
JkMount /* jetty
</VirtualHost>
My idea was to change the VirtualHost
to sub.servername:*
but this doesn’t work.
How could I use a subdomain or directory for the webapps? At the moment, every call will me directed tomcat. My tomcat
runs on the port 8081
. Maybe edit the server.xml
from tomcat?
It would be awesome, if someone could help me. Greetz.
© Server Fault or respective owner