简体   繁体   中英

Nginx is not workingnafter creating aws ec2 instance

After I created AWS EC2 instance, which is running Ubuntu, I started ubuntu with Putty. Then I installed Nginx using these commands: sudo apt-get udpate and sudo apt-get install nginx After this, to check that Nginx was working, I entered the ip address in the browser, but I got ERR_CONNECTION_TIMED_OUT error. Why is Nginx not working? I only followed https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 . I don't know why it is not working.

Check you security group that attached to you EC2 instance and add HTTP and HTTPS rules and IP anywhere. After that try agin, hope it will work for you. Group Policy setting

You should go Security > Security Groups

  • Choose the rule active in your instance of EC2, and click edit
  • Then you should add rules with the ports (80 and 443) (Http and Https) as the bellow image

enter image description here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM