forked from aws-samples/aws-cdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make Python load balancer example start an actual HTTP server (a…
1 parent
62ab40c
commit 1201124
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
#install httpd | ||
yum install httpd -y | ||
|
||
#enable and start httpd | ||
systemctl enable httpd | ||
systemctl start httpd | ||
echo "<html><head><title> Example Web Server</title></head>" > /var/www/html/index.html | ||
echo "<body>" >> /var/www/html/index.html | ||
echo "<div><center><h2>Welcome AWS $(hostname -f) </h2>" >> /var/www/html/index.html | ||
echo "<hr/>" >> /var/www/html/index.html | ||
curl http://169.254.169.254/latest/meta-data/instance-id >> /var/www/html/index.html | ||
echo "</center></div></body></html>" >> /var/www/html/index.html |