aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-04-30 09:56:28 +0200
committerlonkaars <loek@pipeframe.xyz>2021-04-30 09:56:28 +0200
commitc66b7e33e2817039a86805dfd3c9853511192df6 (patch)
tree59cbc2bca4dc4b029c9660287d533d78a6782b44
parentba2cec1c3736cf0fc43db23eb7baa9848f6fb513 (diff)
added nginx config
-rw-r--r--nginx.conf30
1 files changed, 30 insertions, 0 deletions
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;
+}