You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gessendorfer, Thomas" <Th...@TOP-ITSERVICES.COM> on 2005/06/07 12:42:47 UTC

Virtual host, workers file and httpd.conf settings for SSL

Hello,

just installed Apache and Tomcat with the JK Connector and it works for
=
1 worker on my machine.

Now I installed a new Application for which I want to have SSL access.
So I made a new virtual host in my hhtpd.conf that looks like this for =
the standard and the SSL host:

<VirtualHost *:80>
    ServerAdmin  admin@test.de <ma...@test.de>=20
    DocumentRoot c:/Apache/Apache2/htdocs
    ServerName   idmsrv1.example.net
    ErrorLog  logs/idmsrv1.example.net-error.log
    CustomLog  logs/idmsrv1.example.net-access.log common </VirtualHost>
<VirtualHost *:443>
  ServerAdmin  admin@test.de <ma...@test.de>=20
  DocumentRoot  C:/tomcat/Tomcat_5.5.9/webapps/idm
  ServerName  idm.example.net
  ServerAlias  idm
  ErrorLog  logs/idm.example.net-error.log
  CustomLog  logs/idm.example.net-access.log common=20
  SSLEngine On
  SSLCertificateFile conf/ssl/identity.crt
  SSLCertificateKeyFile conf/ssl/server.key </VirtualHost>=20

=20

The JK Part of my httpd.conf looks like this:

# Update this path to match your modules location
LoadModule    jk_module  modules/mod_jk.so
 =20

# Where to find workers.properties
# Update this path to match your conf directory location (put =
workers.properties next to httpd.conf) JkWorkersFile
conf/workers.properties # Where to put jk logs # Update this path to
match your logs directory location (put mod_jk.log = next to access_log)
JkLogFile     logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel    info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,=20
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format=20
JkRequestLogFormat     "%w %V %T"
# send all Servlet Examples to worker1
JkMount /servlets-examples* worker1
# send all JSP Examples to worker1
JkMount /jsp-examples* worker1
# send all Servlet Examples to worker1
JkMount /tomcat-docs* worker1
# send all IDM Examples to worker1
JkMount /idm* worker1

Everything is sent to worker now in my workers.properties file:

# Define 1 real worker using ajp13
worker.list=3Dworker1

# Set properties for worker1 (ajp13)
worker.worker1.type=3Dajp13
worker.worker1.host=3Dlocalhost
worker.worker1.port=3D8009
worker.worker1.lbfactor=3D50
worker.worker1.cachesize=3D10
worker.worker1.cache_timeout=3D600
worker.worker1.socket_keepalive=3D1
worker.worker1.reclycle_timeout=3D300

SSL is already working and I set up this idm.example.net host which =
should be O.K. too.

When I now access the host idm.example.net from the Webbrowser, I see =
the source Code of the /idm/*.jsp site not the correct Website.
Tomcat is not starting the WebApp.

What and how do I have to configure the virtual host, the httpd.conf JK
= configurations and the worker file to get the Webapp working
correctly?
Do I have to set up a second worker (as ajp13?)?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org