Configure HTTP Server in RHEL5
1. To Configure HTTP Server, We should check httpd package installed or
-> To check , #rpm qa httpd* and press enter, if it is installed following line will show,
httpd-2.2.3-11.el5
httpd-manual-2.2.3-11.el5
2.Then, go to this path (/etc/httpd/conf), and open the configuration file called httpd.conf by using vi editor
#vi httpd.conf
3. come to bottom of file , then write script for documnt root folder
systax will be like this,
DocumentRoot /var/www/html/
servername localhost.localdomain.com
For Example
DocumentRoot /var/www/html/ -> this where you saved your html file
ServerName localhost.localdomain.com -> this is your webserver full name ex, linux.fedora.com
4.then save the fileby using :wq command
5. then start the httpd service by using thus command
#service httpd start
the service will start
6.Then , to check service is on or off normally when service start it will automatically on , if it is off by using this command
#chkconfig httpd on
to view ,
#chkconfig –list on ,then service willbe on.
7. Now. Create on html fileunder /var/www/html/ by using vi editor and save through :wq command.
for example ,
#vi hello.html
to check , open mozill browser and enter http://full domain name/webpage name
ex, http://192.168.1.1/hello.html
now it will show what you written in hello html file.