📜  ec2 上的 Web 服务器 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:13.109000             🧑  作者: Mango

代码示例1
Step 1 : sudo yum install -y httpd
Step 2 : chkconfig httpd on 
Step 3 : curl http://169.254.169.254/latest/meta-data/instance-id > /var/www/html/index.html
Step 4 : service httpd start


Step 3 is optional, it just adds the instance id to the html file. 
Don't forget to also open port http:80 on your security groups