nginx - Meteor.js: Is it possible to change the base path in the URL? -
i access entire app using url http://localhost:3000/theapp
instead of http://localhost:3000/
.
in html source of app built using meteor build
:
<html> <head> <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/8b140b84a4d3a2c1d8f5ea63435df8afc22985aa.css?meteor_css_resource=true"> <script src="/215e9bb1458d81c946c277ecc778bae4fc8eb569.js"> ...
i'd change base path /
/theapp
, above <link>
, <script>
tags become:
<link rel="stylesheet" type="text/css" class="__meteor-css__" href="/theapp/8b140b84a4d3a2c1d8f5ea63435df8afc22985aa.css?meteor_css_resource=true"> <script src="/theapp/215e9bb1458d81c946c277ecc778bae4fc8eb569.js">
the reason requirement i'm trying use nginx forward requests different meteor apps based on path in url:
http://localhost/app1 ==> http://meteor-app1 http://localhost/app2 ==> http://meteor-app2
is possible?
so @d4nyll mentioned in comment, need server-level routing instead of application-level routing. solutions such iron router / flow router not work.
found answer here: http://docs.meteor.com/#/full/meteor_absoluteurl
basically need set environment variable: root_url.
Comments
Post a Comment