Last active
January 3, 2016 05:59
-
-
Save dalen/8419913 to your computer and use it in GitHub Desktop.
Optimize puppet CA using apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in puppet.conf add (not needed in recent puppet versions, 3.5+ or something): | |
cadir = $ssldir/ca { mode = 775 } | |
cacert = $cadir/ca_crt.pem { mode = 664 } | |
csrdir = $cadir/requests { mode = 775 } | |
signeddir = $cadir/signed { mode = 775 } | |
in apache site add (change /etc/puppet/ssl to your ssldir path): | |
<IfModule mod_rewrite.c> | |
<Directory /etc/puppet/ssl/ca> | |
AllowOverride None | |
Allow from all | |
</Directory> | |
RewriteEngine on | |
RewriteCond %{THE_REQUEST} ^GET | |
RewriteRule ^/\w+/certificate_revocation_list/ca$ /etc/puppet/ssl/ca/ca_crl.pem [L,T=text/plain] | |
RewriteCond %{THE_REQUEST} ^GET | |
RewriteRule ^/\w+/certificate/ca$ /etc/puppet/ssl/ca/ca_crt.pem [L,T=text/plain] | |
RewriteCond %{THE_REQUEST} ^GET | |
RewriteRule ^/\w+/certificate/([A-Za-z\d\.-]+)$ /etc/puppet/ssl/ca/signed/$1.pem [L,T=text/plain] | |
RewriteCond %{THE_REQUEST} ^GET | |
RewriteRule ^/\w+/certificate_request/([A-Za-z\d\.-]+)$ /etc/puppet/ssl/ca/requests/$1.pem [L,T=text/plain] | |
</IfModule> | |
enable mod_rewrite in apache and restart it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment