0

I need to host a website on AWS EC2 micro with Ubuntu and NGINX. So I get free domain name with dot.tk and mapped ElasticIP of my server with it (used dig utility to check if it pointed to my ip). Then I changed nginx.conf on server and added these standard rows into http section:

server {
    listen 80;
    server_name mydomain.ml;
    root /data/www;

    location / {
        index index.html;
    }
}

But if I write my address in browser it does not show me something.

What I need to do else?

2 Answers 2

3

You need to allow port 80 in your security groups.

2

If you simply want to host a static web site on AWS, EC2 is not the right service to use. You can do so much more cheaply (and more scalably) by simply enabling the built-in Static Website Hosting feature of an S3 bucket.

Alastair Coote, the author of the famous Is my Twitter password secure? site (an educational site about phishing scams) wrote a nice article about his experience serving more than 100K users for USD $0.32: How I served 100k users without breaking the server- or a dollar bill.

1
  • Actually I don't like to host only static website. I started with it because I noob in DevOps and I need to get some knowledge to do more useful things. I choose AWS EC2 because it has free program, and thats what I need right now. Anyway, thank you for your advice!
    – chopchopa
    Sep 4, 2017 at 20:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .