SharkIng
V2EX  ›  问与答

在一个测试服务器上用 grunt serve 启动 angular 然后用 nginx 反代到域名:80,怎么解决资源路径问题?

  •  
  •   SharkIng · Feb 23, 2016 · 1567 views
    This topic created in 3779 days ago, the information mentioned may be changed or developed.
    例如 bower_components/里的; scripts/里的内容??
    现在提示是说 http://域名 /bower_components/xxxxxxx 不存在, scripts 一样

    用的是 yo 官方的 angular 脚手架

    暂时因为只是测试和 demo 所以不准备 build ,有没什么解决办法??
    1 replies    2016-02-23 17:36:51 +08:00
    hxsf
        1
    hxsf  
       Feb 23, 2016
    nginx 里多写个路径匹配, root 填你静态资源位置呗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2675 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:28 · PVG 23:28 · LAX 08:28 · JFK 11:28
    ♥ Do have faith in what you're doing.