generated from nhcarrigan/template
49fd7812dd
Moves 12 redirect-only server blocks out of their mixed host files (content, aria, hikari, celestine, support, scheduling, portfolio) and into a dedicated redirects.conf. Deletes the now-empty scheduling.conf and its sites-enabled symlink.
30 lines
898 B
Plaintext
30 lines
898 B
Plaintext
# Hikari desktop app (Angular SPA + API backend).
|
|
server {
|
|
listen 443 ssl;
|
|
server_name hikari.nhcarrigan.com;
|
|
ssl_certificate /etc/letsencrypt/live/hikari.nhcarrigan.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/hikari.nhcarrigan.com/privkey.pem;
|
|
|
|
root /home/naomi/hikari/client/dist/client/browser;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:20000/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header cf-connecting-ip $http_cf_connecting_ip;
|
|
proxy_set_header origin $http_origin;
|
|
|
|
# This removes /api from the forwarded URL
|
|
rewrite ^/api/(.*)$ /$1 break;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
include /etc/nginx/snippets/deny-dotfiles.conf;
|
|
}
|
|
|