Reputation: 2599
Some sources suggest that it's https://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com/
(where xxx-xxx-xxx-xxx
is the public IP address of the machine). But when I navigate there Chrome says This site can’t be reached
.
Upvotes: 17
Views: 40917
Reputation: 166419
Just use host
command and specify your public IP - it will show you the right URL, e.g.
$ host 52.204.122.132
132.122.204.52.in-addr.arpa domain name pointer ec2-52-204-122-132.compute-1.amazonaws.com.
where ec2-52-204-122-132.compute-1.amazonaws.com
is your domain.
So you can add https://
in front of it to access the instance via HTTPS.
Upvotes: 13
Reputation: 303
The Public DNS and IP address both can be used directly in the browser. You just have to open the ports 80 (http) and 443 (https, not necessary, still...).
You have to upload the file to /var/www/html to host your website.
Upvotes: 1
Reputation: 156
When you access an URL from any browser, you need to make sure there is a server running on port 80, that is the default port. If you just launched a Linux ec2 instance, it's only accessible through ssh. To access these instances you need de access certificate, generated during the launch process and a ssh client, like ssh for Linux or putty for Windows. Also, if you do have a service running on port 80 or any other, you should make sure these ports are opened in the security policy of your instance.
Upvotes: 5