Skip to content

Instantly share code, notes, and snippets.

@billglover
Last active December 20, 2015 23:03
Show Gist options
  • Save billglover/dc8ab5931a36c0dc5de1 to your computer and use it in GitHub Desktop.
Save billglover/dc8ab5931a36c0dc5de1 to your computer and use it in GitHub Desktop.
Install Apache and clone a simple website to demonstrate setting up an AWS web server.
#!/bin/bash
# update package repository
yum -y update
# upgrade all installed packages
yum -y upgrade
# install Apache httpd server
yum -y install httpd
chkconfig httpd on
service httpd start
# install git
yum -y install git
# download website
git clone https://gist.github.com/825e8b4f392521bcb3ac.git /home/ec2-user/aws-demo/
cp /home/ec2-user/aws-demo/index.html /var/www/html/
chown apache: /var/www/html/index.html
@billglover
Copy link
Author

Tested against: Amazon Linux AMI 2015.09.1 (HVM), SSD Volume Type - ami-bff32ccc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment