Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/

<IfModule mod_jk.c>
    JkWorkersFile conf/
    JkLogFile logs/mod_jk.log
    JkLogLevel info
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
    JkOptions +ForwardKeySize +ForwardURICompat

<VirtualHost servername:*>
    ServerName servername
    JkMount /* jetty

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.

share|improve this question
up vote 0 down vote accepted


<VirtualHost *:80>
    DocumentRoot /var/www/html
    ErrorLog logs/domain.error_log

    <Directory "/var/www/html">
        Options -MultiViews +FollowSymLinks
        Order allow,deny
        Allow from all


LoadModule          jk_module modules/

JkWorkersFile       /etc/httpd/conf/
JkShmFile           /var/log/httpd/jk.shm

JkLogFile           /var/log/httpd/mod_jk.log
JkLogLevel          info
JkLogStampFormat    "[%a %b %d %H:%M:%S %Y] "

<VirtualHost *:80>
    JkMount         /* jetty
share|improve this answer

About how to configure AJP service, you need to edit at least these files: httpd.conf of Apache HTTPd, of mod_jk and server.xml of Apache Tomcat.

Look at file if is it defined "jetty" worker and pointing to 8081. Also you need to define on server.xml the AJP connector (by default AJP1.3 it's pointing to port 8009)!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.