Sha256: 2fc5e7dc4fae2d0a8422842f3ac04d070062f7439228ca5c5fbc4d51dd5b072a

Contents?: true

Size: 1.86 KB

Versions: 9

Compression:

Stored size: 1.86 KB

Contents

<%
  @path = "/etc/apache2/sites-available/#{rubber_env.app_name}-jenkins"
  @post = "a2enmod rewrite && a2enmod ssl && a2enmod proxy_http && a2ensite #{rubber_env.app_name}-jenkins"
%>

Listen <%= rubber_env.jenkins_web_port %>
<VirtualHost *:<%= rubber_env.jenkins_web_port %>>
  ServerName      <%= rubber_env.full_host %>

  RewriteEngine   on
  RewriteCond     %{HTTPS} !=on
  RewriteRule     ^/(.*)$ https://%{SERVER_NAME}:<%= rubber_env.jenkins_web_ssl_port %>/$1 [L,R]
  RewriteLog      "/var/log/apache2/rewrite.log"
</VirtualHost>

Listen <%= rubber_env.jenkins_web_ssl_port %>
NameVirtualHost *:<%= rubber_env.jenkins_web_ssl_port %>

<VirtualHost *:<%= rubber_env.jenkins_web_ssl_port %>>
  ServerName      <%= rubber_env.full_host %>
  DocumentRoot    /var/www

  SSLEngine on
  SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  # SSLCertificateFile <%= Rubber.root %>/config/<%= rubber_env.domain.split('.')[-2..-1].join('.') %>.crt
  # SSLCertificateKeyFile <%= Rubber.root %>/config/<%= rubber_env.domain.split('.')[-2..-1].join('.') %>.key
  # SSLCertificateChainFile /etc/ssl/certs/gd_intermediate_bundle.crt

  <Location />
    AuthType Basic
    AuthName "Jenkins"
    AuthUserFile /etc/apache2/jenkins.auth
    Require user <%= rubber_env.web_tools_user %>

    Allow from all
  </Location>

  <Location /github-webhook/>
    Allow from all
    Satisfy Any
  </Location>
  
	ProxyRequests Off
	<Proxy *>
		Order deny,allow
		Allow from all
	</Proxy>
	ProxyPreserveHost on
	ProxyPass / http://localhost:<%= rubber_env.jenkins_proxy_port %>/
  <Location />
    ProxyPassReverse /
  </Location>
  # Fix any redirects occurring on the backend server, since we're communicating with it via HTTP.
  Header edit Location ^http:// https://

</VirtualHost>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubber-2.1.0 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.8 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.7 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.6 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.5 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.4 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.3 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.2 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
rubber-2.0.1 templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf