nginx installation
I have installed nginx on an EC2 (Amazon Linux) by sudo yum install nginx
and did not modify any config files. Then I ran it by sudo systemctl start nginx
and can confirm it’s running. When I run curl localhost:80
I get a “Welcome to nginx!” html response.
security groups
I’ve modified the inbound rules to allow ssh, http, and https. Here’s what I see under “inbound rules”
Name | Security group rule ID | Port range | Protocol | Source | Security groups | Description |
---|---|---|---|---|---|---|
– | – | 5000 | TCP | 0.0.0.0/0 | – | – |
– | – | 22 | TCP | 0.0.0.0/0 | – | – |
– | – | 80 | TCP | 0.0.0.0/0 | – | – |
– | – | 443 | TCP | 0.0.0.0/0 | – | – |
Again, I did not modify any other config file.
I have assigned a static public IP address to the EC2 instance (I can ssh into it). However, when I run the nginx, I cannot see the welcome page on the browser on my laptop. Any idea what I should do to be able to have public access to it?