Apache Installation
1. Standalone Installation in Fedora-based systems
This is meant for Operating Systems such as RHEL and CentOS.
Use the following commands:
sudo yum install httpd mod-ssl
sudo yum install mod_proxy_html
Disabling SELinux
CentOS 7 and Red Hat Enterprise Linux 7 (RHEL 7) come with SELinux pre-installed. This must be disabled because SELinux blocks Apache from loading content outside default directories.
Steps to disable SELinux follow:
Temporary (single session)
sudo setenforce 0
sudo sestatus
Permanent (needs reboot to work)
sudo vi /etc/selinux/config
- Change '
SELINUX=enforcing
' to 'SELINUX=disabled
'. - Save the file.
2. Xampp/Lampp installation
This is meant for Operating Systems such as Windows and Linux.
Run the '.run' installer from Xampp official website.
Managing the Apache server for Lampp
Follow any one of the two options below:
- Use Lampp GUI
Go to ampp install dir and use the following commands accordingly:
To Start:To Stop:To Restart:List status of all Lampp servers/services:
- Use Lampp GUI
Setting up the Virtual Host
1. Apache reverse proxy with SSL
For SSL-based Apache Reverse Proxy, put the template in the appropriate directory based on the installation, rename it and modify it as required.
Standalone Fedora
Target Path: /etc/httpd/conf.d/ssl.conf
Xampp
Target Path: /opt/lamp/etc/extra/httpd-ssl.conf
2. Apache reverse proxy with Mutual TLS
For SSL-based Apache Reverse Proxy, put the template in the appropriate directory based on the installation, rename it and modify it as required:
Standalone Fedora
Target Path: /etc/httpd/conf.d/ssl.conf
Xampp
Target Path:/opt/lamp/etc/extra/httpd-ssl.conf
Customizing the template Proxy Configuration
A passphrase file must be provided with executable permissions; a template of this file is provided for the passphrase 'fiorano'. Change it accordingly for the required use case. Every proxy server configuration template file provided has this setting enabled by default.
When the certificate is encrypted
Do the following in the proxy configuration:
Set the
SSLPassPhraseDialog exec:<Path to passphrase dialog file>/passphrase-file.conf
Run in the terminal
When the certificate is not encrypted
- Comment:
- Uncomment: