diff options
-rw-r--r-- | nginx.conf | 30 |
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; +} |