Web Server Configuration in Redhat
Web server is a computer, which deliver web pages. Every web server will have atleast one static IP address and one domain name. When we request a website, for example (www.abc.com), this domain stored in a web server and web server have a static IP. Static IP of web server is stored in DNS, so our browser goes to web server by help of DNS record to fetch the webpage.
Here we are going to see how to configuration of web server in RHEL5
Before going to configure web server, make sure that following are done correctly
- Hostname
- Domainname
- IP address
- DNS configuration
Package: httpd*
Service: httpd
Port no: 80
Configuration file for web server: /etc/httpd/conf/httpd.conf
#vim /etc/httpd/conf/httpd.conf
Line: 267
#ServerName 192.168.1.101
:wq!
To view line number ”:se nu”
In desktop or any other directory, create a html file named as index.html . index.html is the main page or home page of a web site, For testing simple html codes are sufficient.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<html>
<head>
<title> Web server configuration </title>
</head>
<body>
Test page
</body>
</head>
|
Desktop] #mv index.html /var/www/html
Restart the httpd service.
#service httpd restart
#chkconfig httpd on
To check the web server configuration is correct or wrong, just do the following step i.e., -t followed bt httpd
#httpd -t
To see the webpage (index.html)
#elinks <Server IP>
#elinks 192.168.1.101
(or)
#links 192.168.1.101
(or)
Just go to any browser and give the IP ” 192.168.1.101 ” in address bar
Browser –> Address bar –> 192.168.1.101




