/技术
分类:技术最近更新:2026-04-15浏览:1591
sass 端项目经常有控制台和管理后台两个系统。分别用单页面做的,如果启动两个端口有些浪费,用目录区分就好
nginxserver { listen 8081; server_name 127.0.0.1; client_max_body_size 100M; # sass端 location / { root /home/chuanglan/yunger/web; index index.html; try_files $uri $uri/ /index.html; if ($request_filename ~* .*\.(?:htm|html)$) { add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; } } # 管控后台 location /admin { alias /home/chuanglan/yunger/admin; try_files $uri $uri/ /admin/index.html; if ($request_filename ~* .*\.(?:htm|html)$) { add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; } } # admin代理 location ^~ /boss { proxy_pass http://xx.xx.xx.xx:8098; } # sass控制台接口 location ^~ /console { proxy_pass http://xx.xx.xx.xx:8099; } }
上一篇:前端各业务场景系统规划
下一篇:解决图片403防伪链问题