Basic structure
Notes
- With history-mode routing, fall back to
index.html. - Forward the real IP so visitor analytics and geolocation are accurate.
- Enable HTTPS and install certificates in production.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Serve frontend assets and reverse proxy the backend API.
server {
listen 80;
server_name blog.example.com;
# Public blog
location / {
root /var/www/blogloom/view;
try_files $uri $uri/ /index.html;
}
# Admin console
location /admin/ {
alias /var/www/blogloom/cms/;
try_files $uri $uri/ /admin/index.html;
}
# Backend API
location /api/ {
proxy_pass http://127.0.0.1:8090/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
index.html.