SharkIng
V2EX  ›  问与答

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

  •  
  •   SharkIng · Feb 23, 2016 · 1515 views
    This topic created in 3744 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   ·   3784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:29 · PVG 18:29 · LAX 03:29 · JFK 06:29
    ♥ Do have faith in what you're doing.