事故
生产发布 和原来一样正常发版 一天无事 等二天 产品突然找来说 app端打不开了 然后定位问题
找了半天 也没发现问题所在
还原 Nginx 配置如下 我们原来是设想是 app端 和 pc端 都走一个文件夹 不区分
app — 存放静态资源的地方
jsc — app端资源
— 下面的都是pc端的代码
css
js
fonts
index.html
按照这个设想的话 所有的数据 会先走 ~ .*. 的 方法 静态资源
然后/jsc 这个就没用了 最后统一走 / 模板

server {listen 8089;server_name xxxxxxxx.cn;#charset koi8-r;#access_log logs/host.access.log main;#root /opt/frontend/org-ex-mng-front/app/;#index index.html;location /jsc {alias /opt/frontend/org-ex-mng-front-jsc/app/;try_files $uri $uri/ /app/index.html;index index.html index.htm;}location / {root /opt/frontend/org-ex-mng-front/app/;try_files $uri $uri/ @router;index /index.html;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|css|js|eot|svg|ttf|woff|woff2|properties|json)$ {root /opt/frontend/org-ex-mng-front/app/;}location @router {rewrite ^.*$ /index.html last;}location ^~ /mng/ {proxy_pass http://webapi;}location ^~ /portal/ {proxy_pass http://xxxxxxxx.net.cn/;}}
隐患
所以按照上面的设想 我将 jsc 的配置 就去掉了 或者是改名字了 
如上面所示 可知 不管走不走 /jsc 里面 那么都获取不到数据了 所以这个就废了
问题
上面的理解是错误的 问题所在的地方是 下面这条数据 正则匹配 静态资源 然后跳转去 /opt/frontend/org-ex-mng-front/app/ 这个先处理
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|css|js|eot|svg|ttf|woff|woff2|properties|json)$ {root /opt/frontend/org-ex-mng-front/app/;}
然后这个上面没有
然后走 /jsc 我的这个下面将 app 改成了app01 也不会走
最后走到 / 下面 这个还是在 /opt/frontend/org-ex-mng-front/app/ 下面 还是匹配不到 最后报错 
:::info
/css/598.843a34df.css
/jsc/static/js/app.e74be873.js
/jsc/static/css/app.396cee98.css
:::
