title: JkEnvVar SSL_CLIENT_CERT doesn't work when "SSLVerifyClient require" (setup on a directory-level)
body: <p>[My environment is this: Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.2.9-2 mod_jk/1.2.31
  (although we get the same behavior under an Ubuntu 10.04.2 LTS with similar apache/mod_jk/tomcat specs)]</p>
  
  <p>I have setup a virtual host for serving https and I want to have two types of directories/apps there: one served through 'plain' https and the other served with client authentication (with client certificates).</p>
  
  <p>When "SSLVerifyClient require" is placed on the virtual host level, the relevant JkEnvVar SSL_CLIENT_CERT propagates the info to tomcat correctly. When it is placed on a directory level (inside the virtual host), it doesn't.
  Any clues??</p>
  
  <p>my httpd.conf includes the following lines:</p>
  
  <pre><code>...
  JkWorkersFile conf/workers.properties
  JkShmFile     "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.shm"
  JkLogFile     "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.log"
  JkLogLevel    debug
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
  
  Include conf/extra/httpd-ssl.conf
  ...
  </code></pre>
  
  <p>where conf/workers.properties is just the following:</p>
  
  <pre><code>worker.list=worker1
  worker.worker1.type=ajp13
  worker.worker1.host=localhost
  worker.worker1.port=8009
  </code></pre>
  
  <p>and conf/extra/httpd-ssl.conf contains the following lines:</p>
  
  <pre><code>Listen 443
  
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl    .crl
  
  SSLPassPhraseDialog  builtin
  
  SSLSessionCache        "shmcb:C:/Program Files/Apache Software Foundation/Apache2.2/logs/ssl_scache(512000)"
  SSLSessionCacheTimeout  300
  
  SSLMutex default
  
  &lt;VirtualHost _default_:443&gt;
      DocumentRoot "C:/https"
      ServerName www.webrep.local
      ServerAdmin webmaster@webrep.local
  ErrorLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/https-error.log"
  TransferLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/https-access.log"
  
  SSLEngine on
  
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl/my-server.cert"
  SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl/my-server.key"
  
  SSLCACertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl/ca/myCA.pem"
  
  SSLOptions +StdEnvVars +ExportCertData
  Alias /examples/oneway/ "C:/https/oneway/"
  &lt;Directory "C:/https/oneway"&gt;
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  
  Alias /examples/twoway/ "C:/https/twoway/"
  &lt;Directory "C:/https/twoway"&gt;
      SSLVerifyClient require
      SSLVerifyDepth  10
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  
  BrowserMatch ".*MSIE.*" \
           nokeepalive ssl-unclean-shutdown \
           downgrade-1.0 force-response-1.0
  
  CustomLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/ssl_request.log" \
            "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  
  JkMount  /examples/oneway/servlets/* worker1
  JkMount  /examples/twoway/servlets/* worker1
  JkExtractSSL Off
  JkEnvVar SSL_CLIENT_S_DN
  JkEnvVar SSL_CLIENT_CERT
  
  &lt;/VirtualHost&gt;                                  
  </code></pre>
  
  <p>On Tomcat I have just added a simple servlet outputting:</p>
  
  <pre><code>request.getAttribute("SSL_CLIENT_CERT")
  </code></pre>
  
  <p>under:</p>
  
  <pre><code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\examples\WEB-INF\classes
  </code></pre>