summaryrefslogtreecommitdiff
path: root/templates/puppetmaster.erb
blob: c96472e55263ec8913227019ffb40ae580ef1160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This configuration file was auto-generated by the Puppet configuration
# management system.  Any changes you make to this file will be overwritten
# the next time Puppet runs.  Please make configuration changes to this
# service in Puppet.

server {
    listen                  <%= ssl_port %>;
    ssl_verify_client       on;
    root                    /var/empty;
    access_log              /var/log/nginx/access-<%= ssl_port %>.log;
    rewrite_log             /var/log/nginx/rewrite-<%= ssl_port %>.log;

    # Variables
    # $ssl_cipher returns the line of those utilized it is cipher for established SSL-connection
    # $ssl_client_serial returns the series number of client certificate for established SSL-connection
    # $ssl_client_s_dn returns line subject DN of client certificate for established SSL-connection
    # $ssl_client_i_dn returns line issuer DN of client certificate for established SSL-connection
    # $ssl_protocol returns the protocol of established SSL-connection

    location / {
        proxy_pass          http://puppet-production;
        proxy_redirect      off;
        proxy_set_header    Host             $host;
        proxy_set_header    X-Real-IP        $remote_addr;
        proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header    X-Client-Verify  SUCCESS;
        proxy_set_header    X-SSL-Subject    $ssl_client_s_dn;
        proxy_set_header    X-SSL-Issuer     $ssl_client_i_dn;
        proxy_read_timeout  65;
    }
}

server {
    listen                  <%= non_ssl_port %>;
    ssl_verify_client       off;
    root                    /var/empty;
    access_log              /var/log/nginx/access-<%= non_ssl_port %>.log;
    rewrite_log             /var/log/nginx/rewrite-<%= non_ssl_port %>.log;

    location / {
        proxy_pass  http://puppet-production;
        proxy_redirect     off;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header   X-Client-Verify  FAILURE;
        proxy_set_header   X-SSL-Subject    $ssl_client_s_dn;
        proxy_set_header   X-SSL-Issuer     $ssl_client_i_dn;
        proxy_read_timeout  65;
    }
}