Created
March 21, 2010 14:57
-
-
Save masterzen/339342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8140; | |
| ssl on; | |
| ssl_session_timeout 5m; | |
| ssl_certificate /var/lib/puppet/ssl/certs/master.pem; | |
| ssl_certificate_key /var/lib/puppet/ssl/private_keys/master.pem; | |
| ssl_client_certificate /var/lib/puppet/ssl/ca/ca_crt.pem; | |
| ssl_crl /var/lib/puppet/ssl/ca/ca_crl.pem; | |
| ssl_verify_client optional; | |
| root /etc/puppet; | |
| # make sure we serve everything | |
| # as raw | |
| types { } | |
| default_type application/x-raw; | |
| # those locations are for the "production" environment | |
| # update according to your configuration | |
| # serve static file for the [files] mountpoint | |
| location /production/file_content/files/ { | |
| # it is advisable to have some access rules here | |
| allow 172.16.0.0/16; | |
| deny all; | |
| alias /etc/puppet/files/; | |
| } | |
| # serve modules files sections | |
| location ~ /production/file_content/[^/]+/files/ { | |
| # it is advisable to have some access rules here | |
| allow 172.16.0.0/16; | |
| deny all; | |
| root /etc/puppet/modules; | |
| # rewrite /production/file_content/module/files/file.txt | |
| # to /module/file.text | |
| rewrite ^/production/file_content/([^/]+)/files/(.+)$ $1/$2 break; | |
| } | |
| # ask the puppetmaster for everything else | |
| 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 $ssl_client_verify; | |
| proxy_set_header X-SSL-Subject $ssl_client_s_dn; | |
| proxy_set_header X-SSL-Issuer $ssl_client_i_dn; | |
| proxy_buffer_size 16k; | |
| proxy_buffers 8 32k; | |
| proxy_busy_buffers_size 64k; | |
| proxy_temp_file_write_size 64k; | |
| proxy_read_timeout 65; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment