Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

> Stopping and starting the web service
[root@treebeard ~]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@treebeard ~]# service httpd start

Starting httpd:                                            [  OK  ]
[root@treebeard ~]# service httpd status
httpd (pid 14126 14125 14124 14123 14122 14121 14120 14119 14117) is running...
[root@treebeard ~]#
> Checking web server firewall allows incoming new traffic for port 80
[root@treebeard ~]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Tue Nov  3 09:53:04 2009
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [1:70]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Tue Nov  3 09:53:04 2009
# Generated by iptables-save v1.3.5 on Tue Nov  3 09:53:04 2009
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [664:72586]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 69 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Tue Nov  3 09:53:04 2009
[root@treebeard ~]#
> Locating the Document Root using the httpd.conf file
[root@treebeard ~]# cat /etc/httpd/conf/httpd.conf | grep DocumentRoot
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"
# This should be changed to whatever you set DocumentRoot to.
#    DocumentRoot /www/docs/dummy-host.example.com

[root@treebeard ~]# cat /var/www/html/sample.html
<html>
<head>
 <title>This is the title</title>
</head>
<body>
 <h1>This is my headline</h1>
 <p>This is my paragraph</p>

</body>
</html>
[root@treebeard ~]#