Skip to content

Instantly share code, notes, and snippets.

@aboritskiy
Created October 15, 2018 07:03
Show Gist options
  • Save aboritskiy/92bc45d84332a9ee04507b8e3ab54245 to your computer and use it in GitHub Desktop.
Save aboritskiy/92bc45d84332a9ee04507b8e3ab54245 to your computer and use it in GitHub Desktop.
AWS Autoscaling little demo
#!/bin/bash
yum update -y
yum install -y httpd
echo "<VirtualHost *:80>
ServerName default
ServerAdmin anton.boritskiy@gmail.com
DocumentRoot /var/www/html/
<Directory '/var/www/html/'>
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>" > /etc/httpd/conf.d/test.conf
rm -f /etc/httpd/conf.d/welcome.conf
service httpd stop
service httpd start
chkconfig httpd on
echo "Hello Jackass" > /var/www/html/index.html
echo "I'm healty" > /var/www/html/healthcheck.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment