From 2771ac24e7fd8a2a385a21f11d30daad4f796476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 11 Aug 2011 16:01:44 +0300 Subject: [PATCH] Changed puppetmaster apache to serve files internally instead proxying requests to puppetmaster process. --- puppet/templates/puppet-httpd.conf.erb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/puppet/templates/puppet-httpd.conf.erb b/puppet/templates/puppet-httpd.conf.erb index c6f07c6..5b39116 100644 --- a/puppet/templates/puppet-httpd.conf.erb +++ b/puppet/templates/puppet-httpd.conf.erb @@ -49,7 +49,18 @@ Listen 8140 RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e # Proxy settings - ProxyPass / balancer://puppetmaster:8140/ timeout=180 + + + ForceType application/x-raw + + RewriteEngine On + RewriteRule ^/production/file_content/files/(.+)$ /srv/puppet/files/common/$1 [L] + RewriteRule ^/production/file_content/modules/([^/]+)/files/(.+)$ /etc/puppet/modules/$1/files/$2 [L] + RewriteRule ^/(.*)$ balancer://puppetmaster%{REQUEST_URI} [P,QSA,L] + + + ProxyPass / balancer://puppetmaster:8140/ timeout=180 + ProxyPassReverse / balancer://puppetmaster:8140/ ProxyPreserveHost on SetEnv force-proxy-request-1.0 1