Last active
August 29, 2015 14:20
-
-
Save brianwhigham/5a845410d9d9c27b1390 to your computer and use it in GitHub Desktop.
Configure Web Server
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
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