[英]Change hostname for AWS ec2 instance
I have an AWS EC2 instance with domain like http://ec2-some-ip-addres.compute-1.amazonaws.com/ 我有一个AWS EC2实例,其域名为http://ec2-some-ip-addres.compute-1.amazonaws.com/
Now I want to change this url (add a custom domain which is not registered) to some small alias like testing.webserver.com etc. Can we do that? 现在我想将这个URL(添加一个未注册的自定义域)更改为一些小别名,例如testing.webserver.com等。我们可以这样做吗?
I have tried editing /etc/hosts file with 我试过用/编辑/ etc / hosts文件
ip-address hostname alias
But not working. 但不行。 What is the best way to change the url without making a DNS entry on no-ip or some other services?
如果不在no-ip或其他服务上进行DNS输入,更改URL的最佳方法是什么?
To access an Amazon EC2 instance with your own domain name, use a DNS server (eg Amazon Route 53) to point your domain name to the IP address of the EC2 instance. 要使用您自己的域名访问Amazon EC2实例,请使用DNS服务器(例如Amazon Route 53)将您的域名指向EC2实例的IP地址。
The steps are: 步骤是:
example.com
example.com
server1.example.com
server1.example.com
A
record in the DNS system to point to the Elastic IP address A
记录,指向弹性IP地址 You can then access your instance via server1.example.com
. 然后,您可以通过
server1.example.com
访问您的实例。
See also: Routing Queries to an Amazon EC2 Instance 另请参阅:将查询路由到Amazon EC2实例
You can't change it as it depends upon ec2 servers Private and Public IP . 您无法更改它,因为它取决于ec2服务器专用和公共IP 。 Although you can change the public and private IP.
虽然您可以更改公共和私有IP。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.