How can I correct the Meteor base-url in a NginX reverse-proxy configuration?

前端 未结 2 897
刺人心
刺人心 2021-01-13 02:03

I have installed both Apache and Meteor behind NginX through reverse-proxy (on an Ubuntu server). Apache is mapped directly as baseURL (www.mydomain.com/) and Meteor is mapp

相关标签:
2条回答
  • 2021-01-13 02:23

    Why are you including scripts and styles in your <head> with Meteor? Anything included within your meteor project directory, be it js, html or css, will get bundled up and served to the client without being included in your HTML with <link> and <script>.

    If you must include things in your <head>, why not just use the absolute path including the subfolder?

    <html>
    <head>
      <link rel="stylesheet" href="/live/live.css?abc">
      <script type="text/javascript" src="/live/packages/underscore/underscore.js?efg"></script>
      ...
      <script type="text/javascript" src="/live/template.live.js?hij"></script>
      <script type="text/javascript" src="/live/live.js?klm"></script>
    </head>
    

    Forgive me if I'm misunderstanding the problem.

    0 讨论(0)
  • 2021-01-13 02:32

    The new "absolute-url" package in Meteor 0.4.0 fixed the problem.

    http://docs.meteor.com/#absoluteurl

    0 讨论(0)
提交回复
热议问题