Advertisement
Guest User

henry2

a guest
Feb 7th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Puppet 1.39 KB | None | 0 0
  1. class profiles::henry {
  2.   $apache_config = hiera_hash('profiles::henry::apache')
  3.   $listen_interface = pick($apache_config[listen_interface], $::facts['networking']['primary'])
  4.   $port = hiera('profiles::henry::61100')
  5.  
  6.   apache::vhost { $apache_config['domain_name']:
  7.     ip                    => $::facts['networking']['interfaces'][$listen_interface]['ip'],
  8.     port                  => 443,
  9.     add_listen            => false,
  10.     ssl                   => true,
  11.     ssl_cert              => "${apache_config['ssl_certificate_path']}.cer",
  12.     ssl_key               => "${apache_config['ssl_certificate_path']}.key",
  13.     ssl_chain             => $apache_config['ssl_intermediates'],
  14.     docroot               => '/var/www/html', # dummy value in a proxy context
  15.     proxy_preserve_host   => true,
  16.     allow_encoded_slashes => 'nodecode',
  17.     request_headers       => [
  18.       "set X-Forwarded-Proto 'https' env=HTTPS",
  19.       "set X-Forwarded-Port '443' env=HTTPS",
  20.     ],
  21.     proxy_pass            => [
  22.       {
  23.         'path'         => '/',
  24.  
  25.         #some other port
  26.         'url'          => 'http://localhost:61100/',
  27.  
  28.         'keywords'     => ['nocanon'],
  29.         'reverse_urls' => [
  30.           "http://${apache_config['domain_name']}/",
  31.  
  32.           #some other port
  33.           'http://localhost:61100/',
  34.         ],
  35.       },
  36.     ],
  37.     rewrites              => $rewrites,
  38.   }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement