> ServerName <%= @server_name %> ServerAlias <% @server_aliases.each do |a| %><%= a %> <% end %> DocumentRoot <%= @docroot %> FileETag -INode RewriteEngine On RewriteRule ^/(nagios|jenkins|scratchpad)$ https://%{HTTP_HOST}/$1/ [R=301,NC,L] <% if @server_port.to_s.match(/443$/) %> SSLEngine On SSLCertificateFile <%= $MU_CFG['ssl']['cert'] %> SSLCertificateKeyFile <%= $MU_CFG['ssl']['key'] %> <% if $MU_CFG['ssl'].has_key?("chain") and !$MU_CFG['ssl']['chain'].empty? %> SSLCertificateChainFile <%= $MU_CFG['ssl']['chain'] %> <% end %> SSLProxyEngine on Require all granted ProxyPreserveHost on AllowEncodedSlashes off SSLProxyCheckPeerName off SSLProxyCheckPeerCN off ProxyAddHeaders off # Scratchpad, the Mu secret-sharer ProxyPass /scratchpad https://localhost:<%= MU.mommaCatPort.to_s %>/scratchpad ProxyPassReverse /scratchpad https://localhost:<%= MU.mommaCatPort.to_s %>/scratchpad # Nagios web UI ProxyPass /nagios/ https://localhost:8443/nagios/ ProxyPassReverse /nagios/ https://localhost:8443/nagios/ ProxyPass /cloudamatic.png ! ProxyPass /docs/ ! ProxyPass /index.html ! # Everything else should go to the Chef API endpoint ProxyPass / https://localhost:7443/ ProxyPassReverse / https://localhost:7443/ RequestHeader set X-Forwarded-Proto "https" <% else %> RewriteRule ^/(nagios|jenkins|scratchpad)/(.*) https://%{HTTP_HOST}/$1/$2 [R=301,NC,L] <% end %> RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] \/.*"> Options <%= [@directory_options || "FollowSymLinks" ].flatten.join " " %> AllowOverride <%= [@allow_override || "None" ].flatten.join " " %> Require all granted Options FollowSymLinks AllowOverride None SetHandler server-status Require host 127.0.0.1 <% if @directory_index -%> DirectoryIndex <%= [@directory_index].flatten.join " " %> <% end -%>