Multi-page public site (Next.js), Node/Express backend with Postgres, and Vite admin/account app, restructured from a single-page layout into dedicated service, promotions, cases, about, FAQ, and blog pages for SEO. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013otXCiTZsxdZ4SJKZ9wUky
29 lines
721 B
Caddyfile
29 lines
721 B
Caddyfile
{$DOMAIN} {
|
|
encode gzip
|
|
|
|
handle /api/* {
|
|
reverse_proxy backend:4000
|
|
}
|
|
|
|
# /assets* - собранные JS/CSS файлы admin-app (Vite кладёт их сюда
|
|
# независимо от того, с /admin или /account их запросили).
|
|
@app path /admin* /account* /assets*
|
|
handle @app {
|
|
root * /srv
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|
|
|
|
# Всё остальное (главная страница, /blog и т.д.) обслуживает Next.js -
|
|
# он же сам отдаёт /sitemap.xml и /robots.txt.
|
|
handle {
|
|
reverse_proxy nextjs:3000
|
|
}
|
|
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
X-Frame-Options SAMEORIGIN
|
|
Referrer-Policy strict-origin-when-cross-origin
|
|
}
|
|
}
|