From 661ac8c6f460e05979eb9f66f124ed452e19913e Mon Sep 17 00:00:00 2001 From: creme Date: Tue, 3 Aug 2021 19:04:45 +0200 Subject: [PATCH 1/2] add example nginx config file --- contrib/nginx/README.md | 10 ++++++++++ contrib/nginx/cinny.domain.tld.conf | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 contrib/nginx/README.md create mode 100644 contrib/nginx/cinny.domain.tld.conf diff --git a/contrib/nginx/README.md b/contrib/nginx/README.md new file mode 100644 index 0000000..6c170e4 --- /dev/null +++ b/contrib/nginx/README.md @@ -0,0 +1,10 @@ +# nginx configuration + +## Insert wasm type into nginx mime.types file so they load correctly. + +`/etc/nginx/mime.types`: +``` +.. + application/wasm wasm; +.. +``` diff --git a/contrib/nginx/cinny.domain.tld.conf b/contrib/nginx/cinny.domain.tld.conf new file mode 100644 index 0000000..b735de1 --- /dev/null +++ b/contrib/nginx/cinny.domain.tld.conf @@ -0,0 +1,27 @@ +server { + listen 80; + listen [::]:80; + server_name cinny.domain.tld; + + location / { + return 301 https://$host$request_uri; + } + + location /.well-known/acme-challenge/ { + alias /var/lib/letsencrypt/.well-known/acme-challenge/; + } +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl; + server_name cinny.domain.tld; + + location / { + root /opt/cinny/dist/; + index index.html; + } + location ~* ^\/(login|register) { + try_files $uri $uri/ /index.html; + } +} From 71ee669fc5536a8382f1e7a0e2d06ca934bde2c8 Mon Sep 17 00:00:00 2001 From: creme Date: Tue, 3 Aug 2021 19:07:22 +0200 Subject: [PATCH 2/2] ensure new mime type comes in types. --- contrib/nginx/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/nginx/README.md b/contrib/nginx/README.md index 6c170e4..d902250 100644 --- a/contrib/nginx/README.md +++ b/contrib/nginx/README.md @@ -4,7 +4,9 @@ `/etc/nginx/mime.types`: ``` +types { .. application/wasm wasm; .. +} ```