1

I setup'd a nginx reverse proxy (port 80) redirecting all /proposals requests to meteor/mrt server on 3000. However, the jquery.js file when accessed thru reverse proxy at( http://koinify.com/proposals/packages/jquery.js) is always cut-off around line 1400, so the meteor application doesn't load becuz of the corrupted js file. Yet, when access directly at port 3000 it seem to be just fine: http://koinify.com:3000/proposals/packages/jquery.js

Here's the nginx reverse proxy: upstream app2 { server 127.0.0.1:3000; }

location ^~ /proposals {
     proxy_pass http://app2;
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Tom Ding
  • 61
  • 1
  • 5
  • Are you bundling your app? – David Weldon Jul 19 '14 at 22:38
  • You should, for any production app, though I don't know if that's your problem. See [this](http://stackoverflow.com/questions/18003689/recommended-nginx-configuration-for-meteor) and [this](http://stackoverflow.com/questions/21316344/meteor-vs-meteor-bundle-for-production) and [this](http://stackoverflow.com/questions/22065873/update-deployed-meteor-app-while-running-with-minimum-downtime-best-practice) for some relevant information. – David Weldon Jul 19 '14 at 23:59
  • 1
    See http://stackoverflow.com/q/18003689/586086 for working nginx configurations; I use this for an un-bundled app. – Andrew Mao Jul 20 '14 at 05:33
  • Have you ever found a solution? – Jahan Zinedine Sep 06 '14 at 11:07
  • Here is the answer, and checkout my comment on it: http://serverfault.com/questions/588613/sudden-error-with-wordpress-with-nginx-only-uncaught-syntaxerror-unexpected-en – Jahan Zinedine Sep 06 '14 at 11:38

0 Answers0