Skip to content

Instantly share code, notes, and snippets.

@brianwhigham
Last active August 29, 2015 14:20
Show Gist options
  • Save brianwhigham/5a845410d9d9c27b1390 to your computer and use it in GitHub Desktop.
Save brianwhigham/5a845410d9d9c27b1390 to your computer and use it in GitHub Desktop.
Configure Web Server
yum -y install httpd bind-utils
cd /var/www
HOSTIP=$(host $HOSTNAME|tail -1|awk '{print $4}')
wget -r --header="Host: $HOSTNAME" $HOSTIP
rm -rf html
mv $HOSTIP html
service httpd start
chkconfig httpd on
iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
setenforce 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment