Skip to content

Instantly share code, notes, and snippets.

@daudo
Created July 4, 2014 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daudo/a225d00facdc70f41fe5 to your computer and use it in GitHub Desktop.
Save daudo/a225d00facdc70f41fe5 to your computer and use it in GitHub Desktop.
apache as a x509 proxy
<VirtualHost>
ServerName apache.example.com
[...]
ProxyPass /gitblit ajp://infra.example.com:8009/gitblit
# ProxyPassReverse is not required, because the apache context /gitblit is the same as the tomcat one
<Location /gitblit>
SSLVerifyClient require
SSLVerifyDepth 1
SSLRequireSSL
# only our own certificates are accepted
SSLRequire %{SSL_CLIENT_S_DN_O} eq "The verbose name of the issuer of your certificates"
SSLOptions +StdEnvVars +OptRenegotiate
# what attribute from the certificate shall be used as the "remote username"
# for possible values, see http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslrequire
SSLUserName SSL_CLIENT_S_DN_Email
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment