diff options
author | root@culturestrings <root@culturestrings> | 2020-06-14 06:29:51 +0000 |
---|---|---|
committer | root@culturestrings <root@culturestrings> | 2020-06-14 06:29:51 +0000 |
commit | cc67b0cddd44756394b21b80f31e7829821babec (patch) | |
tree | a0e6a4e5ddc0209a0609641729ce36aee06dcddc | |
parent | 5c0c6d0d14565eab1e32f99b614fea053de39a0c (diff) | |
download | culturestrings-cc67b0cddd44756394b21b80f31e7829821babec.tar.bz2 culturestrings-cc67b0cddd44756394b21b80f31e7829821babec.tar.xz |
nginx: make the top-level nginx.conf site-agnostic.
-rwxr-xr-x | public/fs/etc/nginx/nginx-conf.sh | 11 | ||||
-rw-r--r-- | public/fs/etc/nginx/nginx.conf.in (renamed from public/fs/etc/nginx/nginx.conf) | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/public/fs/etc/nginx/nginx-conf.sh b/public/fs/etc/nginx/nginx-conf.sh new file mode 100755 index 0000000..10a88c6 --- /dev/null +++ b/public/fs/etc/nginx/nginx-conf.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -eu + +hostzone="$1" + +cfg_script="$0" +cfg_srcdir=$(cd -- "${cfg_script%/*}/" ; pwd -P) + +sed -e 's/@hostzone@/'"${hostzone}"'/g' \ + "${cfg_srcdir}/nginx.conf.in" diff --git a/public/fs/etc/nginx/nginx.conf b/public/fs/etc/nginx/nginx.conf.in index cc7b95a..d2165fa 100644 --- a/public/fs/etc/nginx/nginx.conf +++ b/public/fs/etc/nginx/nginx.conf.in @@ -39,9 +39,9 @@ http { listen [::]:443 default_server ssl http2 ipv6only=off reuseport; server_name localhost; - ssl_certificate /srv/webroot/culturestrings.org/ssl/fullchain.pem; - ssl_certificate_key /srv/webroot/culturestrings.org/ssl/privkey.pem; - ssl_trusted_certificate /srv/webroot/culturestrings.org/ssl/chain.pem; + ssl_certificate /srv/webroot/@hostzone@/ssl/fullchain.pem; + ssl_certificate_key /srv/webroot/@hostzone@/ssl/privkey.pem; + ssl_trusted_certificate /srv/webroot/@hostzone@/ssl/chain.pem; location / { root /srv/www/htdocs/; |