I'm attempting to set up apache 2.0 and jk2 to use IP-based virtual hosts, with no success. I'd love it if someone on the list could point out what I'm doing wrong (or point me to some doc that shows how to do this - I've had no luck googling).

I've got apache up and running on a machine with two IP addresses. I'd like to run two tomcat instances, with exactly the same URI mapping, one for each IP address. The problem is that jk2 doesn't appear to take the IP address of the request into account - it simply routes the request to the JkUriSet defined last in the httpd.conf file.

Google searches show examples of this working for jk, but I cannot find any examples of this for jk2. If I can't figure this out I may have to go back to jk.

Below are my jk2.conf, workers2.properties, and ssl.conf (which is included into httpd.conf) files.

I'm running Apache 2.0.45, Tomcat 4.1.24, and jk2 from jakarta-tomcat-connectors-4.1.24-src on RedHat 9.

jk2.conf:
JkOptions -ForwardKeySize -ForwardDirectories -ForwardURICompat +ForwardURICompatUnparsed
JkWorkersFile conf/workers2.properties
JkLogFile /var/log/httpd/jk2.log
JkLogLevel debug
JkLogStampFormat "[%d/%b/%Y %H:%M:%S] "
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"


workers2.properties:
[logger]
level=DEBUG

[shm:]
info=Scoreboard.  Required for reconfig info and status
file=/var/log/httpd/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global Server options
timing=0
debug=1

[channel.socket:68.166.222.75:8019]
info=Ajp13 forwarding over socket for nywdev
debug=1
host=68.166.222.75
tomcatId=dev1:8019

[channel.socket:68.166.222.77:8029]
info=Ajp13 forwarding over socket for nywdev2
debug=1
host=68.166.222.77
tomcatId=dev2:8029

[status:]
info=Status worker, displays runtime info

ssl.conf vhost defns:

<VirtualHost 68.166.222.77:443>
TransferLog /var/log/httpd/dev.access_log

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:!SSLv2
SSLCertificateFile /usr/local/etc/httpd/conf/httpd.crt
SSLCertificateKeyFile /usr/local/etc/httpd/conf/httpd.key

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog /var/log/httpd/ui.ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

<Directory />
  Order Deny,Allow
  Deny from All
</Directory>

<Location "/jkstatus/*">
  SSLRequireSSL
  Order Allow,Deny
  Allow from All
  JkUriSet worker status:
</Location>

<Location />
  SSLRequireSSL
  Order Allow,Deny
  Allow from All
  JkUriSet worker ajp13:68.166.222.77:8029
</Location>

</VirtualHost>

<VirtualHost 68.166.222.75:443>
TransferLog /var/log/httpd/ui.access_log

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:!SSLv2
SSLCertificateFile /usr/local/etc/httpd/conf/httpd.crt
SSLCertificateKeyFile /usr/local/etc/httpd/conf/httpd.key

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog /var/log/httpd/ui.ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

<Directory />
  Order Deny,Allow
  Deny from All
</Directory>

<Location "/jkstatus/*">
  SSLRequireSSL
  Order Allow,Deny
  Allow from All
  JkUriSet worker status:
</Location>

<Location />
  SSLRequireSSL
  Order Allow,Deny
  Allow from All
  JkUriSet worker ajp13:68.166.222.75:8019
</Location>

</VirtualHost>







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to