I set up a Static Website on CentOS using Vagrant
Step 1 - Create a directory named vagrant
Command: mkdir vagrant
Step 2 - Create a directory with the name of the website to be hosted.
Comman: mkdir Static_website
Step 3 - Change directory to the directory created in step 2
Command: cd Static_website
Step 4 - Create a vagrantfile in the wavecafe directory with the vagrant box config gotten from vagrant cloud.
Command: vagrant init centos/7
Step 5 - Use vim editor to modify the vagrantfile configuration. (this is to enable IP the address)
Step 6 - Bring up the vm
Command: vagrant up
Step 7 - Log on to VM
Command: vagrant ssh
Step 8 - switch to root user
Command: sudo -i
Step 9 - Install httpd
Command: yum install httpd wget unzip -y
Step 10 - Set up httpd (Start the service)
Command: systemctl start httpd
Step 11 - Set up httpd (Enable the service to run at start up)
Command: systemctl enable httpd
Step 12 - Access the default server page. Use ifconfig or IP addr show command to look up the IP address
Step 13 - Switch to the tmp directory
Command: cd /tmp/
NB: I Downloaded a sample website template from https://www.tooplate.com
Step 14: Download via the CLI "
Command: wget https://www.tooplate.com/zip-templates/2122_nano_folio.zip
Step 15: unzip the file and copy all the contents to the /var/www/html/ directory
Command: unzip -o 2122_nano_folio.zip
Command: cp -r 2122_nano_folio/* /var/www/html/
Step 16: Restart the httpd Service
Command: systemctl restart httpd
Step 17: Refresh the browser