| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- # =============================================================================
- # vasen-website 独立 8090 端口配置(简化版,本地直连用)
- #
- # 不需要 HTTPS 证书,适合本地开发/快速预览。
- # 访问地址:http://localhost:8090/
- #
- # 注意:此配置不包含 water-cology SPA 的 CORS/mock 路由,
- # 完整功能请使用 vasen-website.conf(配合 HTTPS server)。
- # =============================================================================
- server {
- listen 8090;
- server_name _;
- root /lio/projects/vasen-website;
- index index.html;
- charset utf-8;
- location / {
- try_files $uri $uri.html $uri/ $uri/index.html =404;
- }
- # HTML 不缓存
- location ~* \.html?$ {
- add_header Cache-Control "no-cache, must-revalidate";
- expires off;
- }
- # 静态资源长缓存
- location ~* \.(js|css|svg|ico|png|jpg|jpeg|gif|woff2?|ttf|eot|pdf)$ {
- expires 30d;
- add_header Cache-Control "public";
- access_log off;
- }
- # 健康检查
- location = /healthz {
- add_header Content-Type text/plain;
- return 200 "ok\n";
- access_log off;
- }
- # 安全:禁止访问隐藏文件
- location ~ /\. {
- deny all;
- }
- }
|