diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-12-14 23:08:17 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-12-14 23:08:17 +0100 |
commit | 58c53f131ced9c7fa89e042732d5c671662f7c58 (patch) | |
tree | 82794b9580376f7b302dd9e43e38d2c584421fe3 /roles/webserver/files | |
parent | 0f5bdcf6e347946fbfb9f1347edc98bc444abe0a (diff) | |
download | ansible-memzero-58c53f131ced9c7fa89e042732d5c671662f7c58.tar.gz ansible-memzero-58c53f131ced9c7fa89e042732d5c671662f7c58.zip |
nginx: add proxy for cgit
Diffstat (limited to 'roles/webserver/files')
-rw-r--r-- | roles/webserver/files/user_conf.d/memzero.conf | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/webserver/files/user_conf.d/memzero.conf b/roles/webserver/files/user_conf.d/memzero.conf index 3a9013f..1847b18 100644 --- a/roles/webserver/files/user_conf.d/memzero.conf +++ b/roles/webserver/files/user_conf.d/memzero.conf @@ -63,6 +63,32 @@ server { } server { + # Listen to port 443 on both IPv4 and IPv6. + listen 443 ssl; + listen [::]:443 ssl; + + # Domain names this server should respond to. + server_name git.memzero.de; + + # Load the certificate files. + ssl_certificate /etc/letsencrypt/live/memzero/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/memzero/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/memzero/chain.pem; + + # Load the Diffie-Hellman parameter. + ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; + + location / { + 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-Forwarded-Proto $scheme; + + proxy_pass http://cgito; + } +} + +server { # Drop any request that does not match any of the other server names. listen 443 ssl default_server; ssl_reject_handshake on; |