From c66b7e33e2817039a86805dfd3c9853511192df6 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 30 Apr 2021 09:56:28 +0200 Subject: added nginx config --- nginx.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..82695fe --- /dev/null +++ b/nginx.conf @@ -0,0 +1,30 @@ +server { + listen 443 ssl; + listen [::]:443 ssl; + + ssl_certificate /etc/letsencrypt/live/of.pipeframe.xyz/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/of.pipeframe.xyz/privkey.pem; + + server_name of.pipeframe.xyz; + + error_page 404 =404 @empty_json; + error_page 403 =403 @empty_json; + + root /var/www/of-api; + + location / { + try_files $uri $uri/ =404; + } + + location @empty_json { + return 404 "{}"; + } +} + +server { + listen 80; + listen [::]:80; + + server_name of.pipeframe.xyz; + return 301 https://of.pipeframe.xyz$request_uri; +} -- cgit v1.2.3