Meteor.js部署到“example.com”或“www.example.com”? [英] Meteor.js deploy to "example.com" or "www.example.com"?

查看:162
本文介绍了Meteor.js部署到“example.com”或“www.example.com”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用以下命令部署了流星应用程序:

  $ meteor deploy example.com 

及以后(认为相同)使用以下内容:

  $ meteor deploy www.example.com 

它结束提供两个不同版本的应用程序,一个托管在example.com中,另一个托管在www.example.com中。



我可以还原其中一个部署?我应该还原哪一个?



如果没有,我应该在我的域提供商上设置什么样的配置?



谢谢,
Joao

解决方案

当人们访问您的网页时,您希望他们看到 mydomain.com 还是 www.mydomain.com



如果是 mydomain.com ,那么要设置您的DNS区域文件为 A 指向IP为的域的$ c>记录origin.meteor.com



如果是 www.mydomain.com ,那么您想要为域名www指向 CNAME 设置DNS区域文件> origin.meteor.com



然后,您要从其中一个选项设置域转发。例如,我已经设置了 http://playlistparty.net 转发到 http://www.playlistparty.net



此后,您只需运行: p>

 流星部署www.playlistparty.net 



您可以使用--delete选项删除不使用的部署。

 流星部署www.playlistparty.net  - 删除


I recently deployed a meteor app using the following command:

$ meteor deploy example.com

and later (thinking that it was the same) using the following:

$ meteor deploy www.example.com

It end up serving two different versions of the app, one hosted in "example.com" and other hosted in "www.example.com".

Can I revert one of the deploys? Which one should I revert?

If not, what kind of configs should I set on my domain provider?

Thank you, Joao

解决方案

When people go to your page, do you want them to see mydomain.com or www.mydomain.com?

If it's mydomain.com, then you want to set your DNS zone file with an A record for the domain that points to the IP of origin.meteor.com

If it's www.mydomain.com, then you want to set your DNS zone file with a CNAME for the subdomain "www" that points to origin.meteor.com

Then, you want to set "domain forwarding" from one of those choices to the other. For example, I've set up http://playlistparty.net to forward to http://www.playlistparty.net.

After this, you just run:

meteor deploy www.playlistparty.net


You can delete the deployment you won't be using with the --delete option.

meteor deploy www.playlistparty.net --delete

这篇关于Meteor.js部署到“example.com”或“www.example.com”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆