redhathttpd

Red Hat WebServer

Summary: How to install apache webserver on Red Hat.
Date: Around 2014
Refactor: 29 March 2025: Checked links and formatting.

This is a small howto on how to deply a webserver, also known as a httpd server, on Red Hat. Deploying services on Red Hat is always on the ISET method:

  • I: Install
  • S: Service
  • E: Enable
  • T: Test

ISET the httpd Server

Install the webserver using this command:

yum install httpd

Service is for starting the httpd service:

service httpd start

Enable is for enabling the service to start automatically on system boot:

chkconfig httpd on

Testing a webservice is quite easy, you can use firefox or a text based browser like curl:

curl localhost

or

curl 192.168.25.128

Now you have a webserver running. The default root for html files is /var/www/html/

Firewall

If your firewall is enabled and you cannot access the webserver from a different computer, but can from the localhost port 80 is probably blocked. Open it by editing /etc/sysconfig/iptables:

vim /etc/sysconfig/iptables

Now append the following rule to open port 80:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

Now save the file and restart iptables:

service iptables restart
redhathttpd.txt · Last modified: by 127.0.0.1

Exception: Git command failed to perform periodic pull: From https://dev.azure.com/getshiftingcom/Documentation/_git/knowledge * branch main -> FETCH_HEAD There is no candidate for rebasing against among the refs that you just fetched. Generally this means that you provided a wildcard refspec which had no matches on the remote end.

Exception: Git command failed to perform periodic pull: From https://dev.azure.com/getshiftingcom/Documentation/_git/knowledge * branch main -> FETCH_HEAD There is no candidate for rebasing against among the refs that you just fetched. Generally this means that you provided a wildcard refspec which had no matches on the remote end.

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the gitbacked plugin.

More info has been written to the DokuWiki error log.