SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

redhathttpd

Red Hat WebServer

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
You could leave a comment if you were logged in.
redhathttpd.txt · Last modified: 2021/09/24 00:25 (external edit)