api routing

This commit is contained in:
Leander West Furumo authored and GitHub committed 2021-05-21 00:13:00 +02:00
1 parent 75980805a3
commit bcec231b32
1 file changed
+31
+31
View File
@@ -33,6 +33,23 @@ server {
}
server {
server_name api.uiogaming.no;
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:9001;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api.uiogaming.no/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api.uiogaming.no/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name admin.uiogaming.no;
rewrite ^/(.*)$ https://uiogaming.sanity.studio;
@@ -367,3 +384,17 @@ server {
}
server {
if ($host = api.uiogaming.no) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name api.uiogaming.no;
listen 80;
return 404; # managed by Certbot
}