Articles of meteor

meteor – “ROOT_URL”的目的是什么?应该定义什么?

我在我的Ubuntu服务器上使用PhantomJS进行Spiderable工作时遇到一些问题。 我在Meteorpedia上看到了这个故障排除: 确保您的Meteor服务器configuration使用的ROOT_URL可以从服务器本身访问。 (自v0.8.1.3 [1]) 我认为这可能是为什么它不工作的一个可能的答案。 这个环境variables的目的究竟是什么? 我的应用程序可以在http://gentlenode.com/上公开访问,但是我的nginx上的proxy_pass被设置为http://gentlenode/ 。 # HTTPS Server server { listen 443; server_name gentlenode.com; # … location / { proxy_pass http://gentlenode/; proxy_http_version 1.1; # … } } 我应该将ROOT_URL设置为http://gentlenode.com/ http://gentlenode/还是http://localhost/ ? 你可以在这里find我的nginxconfiguration: https : //gist.github.com/LeCoupa/9877434

如何在AWS弹性beanstalk上自定义nginx以负载均衡Meteor?

我在AWS Elastic Beanstalk上运行meteor。 一切都运行起来,除非它没有运行带有以下错误的Websockets: WebSocket connection to 'ws://MYDOMAIN/sockjs/834/sxx0k7vn/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400 我的不足之处在于添加如下内容: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 到代理configuration,通过我的YMLconfiguration文件。 通过我的.exbextensionconfiguration文件: files: "/etc/nginx/conf.d/proxy.conf" : mode: "000755" owner: root group: root content: | proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 我已经ssh进入服务器,我可以看到它的两条线proxy.conf。 当我打我的networking服务器,我仍然看到“错误在WebSocket握手:”错误。 我有用stick会话configuration我的beanstalk加载和以下端口: 顺便说一句,我看到https://meteorhacks.com/load-balancing-your-meteor-app.html ,我试图: Enable HTTP load balancing with Sticky Session […]

meteor – 自动启动客户端login

我有一个meteor应用程序,我用nginx与内部SSO服务进行身份validation。 我能够成功地完成这个工作,并在服务器Meteor.onConnection方法的nginx set http头文件中检索用户详细信息。 在这一点上,我不知道什么是最好的方法是访问客户端的用户细节。 我觉得我应该使用内置的meteor帐户,但我不知道如何从客户端启动login过程,因为用户实际上不会通过meteor客户端login,而是通过通过nginx发生的redirect。 我觉得我需要一种方法来自动启动meteor端的login过程,以适当地设置meteor.users集合,但我无法想出办法做到这一点。

我怎样才能更正Nginx反向代理configuration中的Meteor base-url?

我通过反向代理(在Ubuntu服务器上)将Apache和Meteor都安装在NginX后面。 Apache直接映射为baseURL(www.mydomain.com/),Meteor映射为子文件夹(www.mydomain.com/live/)。 我遇到的问题是我的Meteortesting(在端口3000工作正常)在NginX后面停止工作,因为每个引用(CSS,Javascript,模板)对于baseURL是绝对的。 <html> <head> <link rel="stylesheet" href="/live.css?abc"> <script type="text/javascript" src="/packages/underscore/underscore.js?efg"></script> … <script type="text/javascript" src="/template.live.js?hij"></script> <script type="text/javascript" src="/live.js?klm"></script> </head> 显然,由于Apache被映射到baseURL,因此在通过NginX进行testing时,没有find这些文件。 解决问题的最好方法是什么? 系统pipe理不是我的特长,而Meteor是我在服务器端JavaScript的第一次入侵。 所以我甚至不知道这是否可以解决,如果是的话,如果这是通过服务器configuration,meteorconfiguration或编程。 编辑:在meteor0.4.0新的“绝对url”包修正了问题! http://docs.meteor.com/#absoluteurl

bcrypt打破了我的meteor应用程序,我该如何解决?

我不知道这应该是一个stackoverflow或serverfault问题。 我安装了Meteor的帐号密码模块,它在本地工作,但是在部署到服务器时破坏了我的应用程序。 这是独家新闻: 我在OSX上本地运行最新的Meteor 1.0.5(OS完全更新)使用–architecture os.linux.x86_64构build部署到Ubuntu 14.04.2 LTS x86_64(刚刚更新)运行nodejs v0.12.1(新build)用nginx v1.4.0提供应用程序 仍然得到: /home/secrethistory/bundle/programs/server/node_modules/fibers/future.js:245 throw(ex); ^ Error: Module did not self-register. at Error (native) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at bindings (/home/secrethistory/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15) at Object.<anonymous> (/home/secrethistory/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/bcrypt.js:3:35) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) 任何提示或地方看下一个?

Nginx和多个Meteor / Nodejs应用程序的问题

我知道多个node.js,我假设扩展Meteor,可以使用Nginx运行在一台服务器上。 我已经安装了Nginx并在Ubuntu服务器上运行,我甚至可以让它响应请求并将它们代理到我的一个应用程序。 然而,当我尝试让Nginx代理第二个应用程序的stream量时,我遇到了一个障碍。 一些背景: 第一个应用程序在端口8001上运行 第二个应用程序在端口8002上运行 Nginx在80端口监听 尝试让nginx发送/到应用程序一的stream量和在/ app2 /到应用程序二的stream量 转到域:8001和域:8002可以访问这两个应用程序 我的Nginxconfiguration: upstream mydomain.com { server 127.0.0.1:8001; server 127.0.0.1:8002; } # the nginx server instance server { listen 0.0.0.0:80 default_server; access_log /var/log/nginx/mydomain.log; location /app2 { rewrite /app2/(.*) /$1 break; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:8002; proxy_redirect off; […]

meteorWebSocket与Nginx握手错误400

我设法在我的基础设施上部署meteor(Webfactions)。 该应用程序似乎工作正常,但我的应用程序启动时浏览器控制台中出现以下错误: WebSocket connection to 'ws://…/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

推荐用于meteor的nginxconfiguration

我的meteor应用程序的网站configuration有如下的指令: server { listen 443; server_name XXX; ssl on; ssl_certificate XXX; ssl_certificate_key XXX; location / { proxy_pass http://localhost:3000; proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpProxyModule proxy_http_version 1.1; # recommended for keep-alive connections per http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } } 我觉得我应该告诉nginx服务static_cacheable内容,并设置expires标题为max 。 我到底怎么做呢? 我还有其他的东西吗?

“用代码8退出”示例meteor应用程序

我是Meteor.js新手,目前正在研究"leaderboard"示例应用程序。 插入一行代码后: Template.leaderboard.player = function(){ return "Some other text" } 我收到了应用程序界面中的错误: “你的应用程序崩溃了,这是最新的日志。” 你好,世界 /home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173 throw(ex); ^ ReferenceError: Template is not defined at app/leaderboard.js:13:1 at app/leaderboard.js:17:3 at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:168:10 at Array.forEach (native) at Function._.each._.forEach (/home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/underscore/underscore.js:79:11) at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:82:5 => Exited with code: 8 => Your application is crashing. Waiting for file change." 我重新保存了文件,进入terminal并停止了服务器并重新启动并收到了以下内容: => Exited with code: 8 […]

将meteor作为守护进程运行

我刚安装了Linux CentOS服务器来运行Meteor应用程序。 我现在碰到的第一个问题是启动meteor进程作为守护进程,所以它在后台运行,我可以退出我的SSH会话。当meteor –production开始meteor –production我不能。 当使用Ruby on Rails时,我可以从rails s -d -p 80并退出。 我发现一个名为屏幕的应用程序和echo "meteor –production" | at echo "meteor –production" | at是选项,但是我没有安装at命令,只是为了在后台运行它而安装一个app似乎是一个奇怪的select。 我真的需要安装screen还是at ? 还有其他的select吗?