diff --git a/contrib/nginx/README.md b/contrib/nginx/README.md new file mode 100644 index 0000000..d902250 --- /dev/null +++ b/contrib/nginx/README.md @@ -0,0 +1,12 @@ +# nginx configuration + +## Insert wasm type into nginx mime.types file so they load correctly. + +`/etc/nginx/mime.types`: +``` +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; + } +}