---
title: "Apache http server (httpd)"
description: "How to install and configure Apache httpd as a reverse-proxy web server for the Corridor Platform, including SSL setup."
---
This section describes how to use apache ([https://httpd.apache.org/](https://httpd.apache.org/)) as a web server, one of the two [reverse-proxy options](/technology/installation/components/web-server/) supported alongside [Nginx](/technology/installation/components/web-server/nginx/).
To use HTTPD, it needs to be installed in the system and the daemon should be running with the
appropriate site configurations setup.
## Installation
The official installation instructions can be found at [https://httpd.apache.org/docs/2.4/install.html](https://httpd.apache.org/docs/2.4/install.html)
The recommended method of installation is to use the package manager provided by the Operating System (apt-get, yum, etc.).
**RedHat:**
```sh
yum install httpd
```
**Ubuntu:**
```sh
apt install apache2
```
## Configurations
Once installed, the httpd configuration needs to be created to proxy the web server components as described in
[https://httpd.apache.org/docs/2.4/vhosts/examples.html](https://httpd.apache.org/docs/2.4/vhosts/examples.html)
and [https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass)
### Configuration example for CentOS
Here is an example httpd configuration that sets up the Web Application Server:
1. Create the file: `/etc/httpd/sites-available/corridorapp.conf` with below configs
```apache
ServerName www.corridorapp.com
ServerAlias corridorapp
ProxyPass / http://localhost:5002/
ProxyPassReverse / http://localhost:5002/
ErrorLog /var/www/corridorapp/log/error.log
CustomLog /var/www/corridorapp/log/requests.log combined
```
2. Create symlink to the above file as `/etc/httpd/sites-enabled/corridorapp.conf` using the command:
- This is done to control the configs available versus the subset of those enabled
3. Add below text to `/etc/httpd/conf/httpd.conf`:
`IncludeOptional sites-enabled/*.conf`
### Configuration example for CentOS (SSL based)
To setup a secure connection, update the `/etc/httpd/sites-available/corridorapp.conf` file as below:
```apache
SSLEngine On
SSLCertificateFile /certs/app.crt
SSLCertificateKeyFile /certs/app.key
SSLCertificateChainFile /certs/ca.crt
ServerName www.corridorapp.com
ServerAlias corridorapp
ProxyPass / http://localhost:5002/
ProxyPassReverse / http://localhost:5002/
ErrorLog /var/www/corridorapp/log/error.log
CustomLog /var/www/corridorapp/log/requests.log combined
```
:::note
If the httpd is not listening on port 80 (443 for SSL) - but listens on another port, the
corresponding port has to be added along with `VirtualHost` keyword and the `Listen` param's value has to be appropriately updated in `/etc/httpd/conf/httpd.conf` (`/etc/httpd/conf.d/ssl.conf` for SSL).
:::
:::note[Note: Permission issues]
In case of permission issues, ensure user permissions and SELinux is set up correctly.
:::