Saturday, 22 June 2013

Configuring Web Services, HTTP

#yum install httpd           --> You need to be root to install any package.
#service httpd restart
#chkconfig httpd on       --> It will ensure httpd will be started on the required run level

Note: Home/default directory of httpd is /var/www/html/

Download the file from the given URL in the question to your home directory or to the location mentioned using wget:

Now we have to copy this file 'index.html' from home directory to '/var/www/html'
#cp index.html /var/www/html
Note: Refrain using 'move' unless mentioned in question. Because 'mv' will not allow to open the web page due to the selinux set up.

If in exam 'move' is mentioned, do below steps:
#mv index.html /var/www/html
#cd /var/www/html
#restorecon *                --> It sets the selinux of the selinux context of the file similar to the parent folder

No comments:

Post a Comment