summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-11-23 22:26:08 +0000
committerJohannes Löthberg <johannes@kyriasis.com>2016-11-23 22:26:08 +0000
commit6bdba33f5029e1d029228be675c1c75deed13c97 (patch)
tree912cd60a3386f787bf6910d5b0bb40d7d7f3e23a
parent844cbdc1a4cb7c87b87c213086081e03b2de5307 (diff)
downloadpillar-6bdba33f5029e1d029228be675c1c75deed13c97.tar.xz
Add gerrit nginx host
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--theos/nginx/gerrit_kyriasis_com.sls45
1 files changed, 45 insertions, 0 deletions
diff --git a/theos/nginx/gerrit_kyriasis_com.sls b/theos/nginx/gerrit_kyriasis_com.sls
new file mode 100644
index 0000000..4504ab4
--- /dev/null
+++ b/theos/nginx/gerrit_kyriasis_com.sls
@@ -0,0 +1,45 @@
+nginx:
+ ng:
+ servers:
+ managed:
+ gerrit.kyriasis.com:
+ enabled: True
+ config:
+ - server:
+ - server_name: gerrit.kyriasis.com
+ - listen: 80
+ - listen: '[::]:80'
+ - return: '301 https://$server_name$request_uri'
+
+ - server:
+ - server_name: gerrit.kyriasis.com
+ - listen: 443 ssl http2
+ - listen: '[::]:443 ssl http2'
+
+ - ssl: 'on'
+ - ssl_certificate: /etc/letsencrypt/live/gerrit.kyriasis.com/fullchain.pem
+ - ssl_certificate_key: /etc/letsencrypt/live/gerrit.kyriasis.com/privkey.pem
+ - ssl_dhparam: /etc/nginx/dhparam.pem
+
+ - ssl_stapling: 'on'
+ - ssl_stapling_verify: 'on'
+ - ssl_trusted_certificate: /etc/letsencrypt/live/gerrit.kyriasis.com/fullchain.pem
+
+ # Enable the Cross-site scripting filter in most recent browsers.
+ # Normally enabled by default, but enable it anyway if user has disabled it.
+ - add_header: 'X-XSS-Protection "1; mode=block"'
+
+ # http://www.gnuterrypratchett.com/
+ - add_header: 'X-Clacks-Overhead "GNU Terry Pratchett"'
+
+ - root: /srv/http/
+
+ - location /:
+ - proxy_pass: http://127.0.0.1:8081
+ - proxy_set_header: X-Forwarded-For $remote_addr
+ - proxy_set_header: Host $host
+
+ - location /.well-known:
+ - root: /srv/http/
+
+# vim: ft=yaml et: