achievements/nginx.conf

33 lines
860 B
Nginx Configuration File

# Backend
server {
listen 4000 ssl http2;
listen [::]:4000 ssl http2;
server_name achievements.ajb.dk;
ssl_certificate /etc/letsencrypt/live/ajb.dk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ajb.dk/privkey.pem;
location / {
proxy_pass http://localhost:4001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
# Frontend (serve yew app static files)
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name achievements.ajb.dk;
ssl_certificate /etc/letsencrypt/live/ajb.dk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ajb.dk/privkey.pem;
location / {
alias /var/www/achievements/;
try_files $uri $uri/ /index.html;
}
}