56 lines
1.2 KiB
Text
56 lines
1.2 KiB
Text
upstream api {
|
|
server 127.0.0.1:50001;
|
|
}
|
|
|
|
upstream leaf {
|
|
server 127.0.0.1:50002;
|
|
}
|
|
|
|
server {
|
|
listen [::]:80;
|
|
listen 80;
|
|
|
|
server_name xmr.megabyte.space;
|
|
|
|
root /var/www/html;
|
|
|
|
location /.well-known/acme-challenge/ { allow all; }
|
|
location / { return 301 https://$host$request_uri; }
|
|
}
|
|
|
|
server {
|
|
listen [::]:443 ssl http2;
|
|
listen 443 ssl http2;
|
|
|
|
server_name xmr.megabyte.space;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/xmr.megabyte.space/fullchain.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/xmr.megabyte.space/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/xmr.megabyte.space/privkey.pem;
|
|
|
|
include snippets/ssl.conf;
|
|
#include snippets/security.conf;
|
|
#include snippets/edge.conf;
|
|
#include snippets/cache.conf;
|
|
#include snippets/nosniff.conf;
|
|
|
|
charset utf-8;
|
|
error_page 404 /404.html;
|
|
|
|
index index.html;
|
|
root /var/www/html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://api/;
|
|
include snippets/proxy.conf;
|
|
}
|
|
|
|
location /leaf {
|
|
proxy_pass http://leaf;
|
|
include snippets/proxy.conf;
|
|
}
|
|
}
|