Apache HTTPD Web Server – Details and Installation

Last modified: July 30, 2020
You are here:
Estimated reading time: 2 min
In this article

Apache HTTPD is one of the most used web servers on the Internet. Apache HTTP Server is a free software/open source web server for Unix-like systems and other operating systems. A web server is a daemon that speaks the http(s) protocol, a text-based protocol for sending and receiving objects over a network connection. The http protocol is sent over the wire in clear text, using port 80/TCP by default (though other ports can be used). There is also a TLS/SSL encrypted version of the protocol called https that uses port 443/TCP by default. A basic http exchange has the client connection to the server. Then it requests a resource using the GET command. Other commands like HEAD and POST exist, allowing clients to request just metadata for a resource, or send the server more information.
Apache features configurable error messages, DBMS-based authentication databases, and content negotiation. It is also supported by several graphical user interfaces (GUIs) which permit easier, more intuitive configuration of the server. In the process of http exchange, the client starts by requesting a resource (the GET command), and then follows up with some extra headers, telling the server what types of encoding it can accept, what language it would prefer, etc. The request is ended with an empty line. The server then replies with status code followed by a list of headers. The Content-Type header is a mandatory one, telling the client what type of content is being sent. After the headers are done, the server sends an empty line, followed by the requested content. The length of this content must match the length indicated in the Content-Length header.

While the http protocol seems easy at first, implementing all the protocol-along with security measure, support for clients not adhering fully to the standard, and support for dynamically generated pages-is not an easy task. That is why most application developers do not write their own web servers, but instead write their applications to be run behind a web server like Apache HTTPD, implementing a fully configurable and extendable web server with full HTTP support. The functionality of httpd can be extended with modules, small pieces of code that plug into the main web server framework and extend its functionality. A default dependency of the http package is the httpd-tools package. This package includes tools to manipulate password maps and databases, tools to resolve IP addresses in log files to host names, and a tool to benchmark and stress-test web servers.

 

Install Apache/httpd service under Linux

1) To install apache server in Fedora / RHEL / Cent OS Linux, please use the following command.

$  yum install httpd

To start the Apache/httpd, use the below given command.

$  chkconfig httpd on
$  /etc/init.d/httpd start

2) To install apache server in Red Hat Enterprise Linux, please use the following command.

$ yum install httpd

To start the Apache/httpd, use the below given command.

$ chkconfig httpd on
$ /etc/init.d/httpd start

3) To install apache server in Debian Linux, please use the following command.

$ apt-get install apache2
$ /etc/init.d/apache2 start

Task: Store files / upload files for your web site

1) You need to upload files at /var/www/html under RHEL / CentOS / Fedora Linux operating system.

2) You need to upload files at /var/www/ under Debian or Ubuntu Linux operating system.

Apache Server configuration

After installing the web-server package group or the http package, a default configuration is written to /etc/httpd/conf/httpd.conf (RHEL/Cent OS/Fedora Core Linux) or /etc/apache2/httpd.conf (Debian / Ubuntu Linux). This configuration serves out the contents of /var/w/html for requests coming in to any hostname over plain http. Use a text editor such as vi to edit the configuration file.

 

If you need any further assistance please contact our support department.

 

Was this article helpful?
Dislike 0
Views: 22