We're still working on finding a way to deploy that config-change reliably on RHEL7. The issue is that RHEL7's httpd change is in the release, not the version, so can't be used to 'protect' the change - and trying to use HttpProtocolOptions on an httpd that doesn't support it, causes httpd to fail and exit. This should update both the configure options and the version of apache to the most recent version. Once the update has completed, you'll need to restart apache: RedHat.
CentOS’s package installed version of apache is out of date. We will compile our own from source.
First, install the required packages.
Download Apache
Download Apache from httpd.apache.org. The current stable release is 2.4.4.
Latest Http Version
Once you get the direct URL to download the latest stable version of Apache, use wget as shown below to download it directly to your server.
Download APR and APR-Util
Apache is the best PHP server, and the Apache server under httpd 2.4.15 has security vulnerabilities, so it is necessary to install the latest version of the Apache server. In this tutorial I am going to describe simple steps to install the latest Apache ( The latest version of the Apache server is httpd 2.4.29 ) version on your Centos 7 system.
Now we have to download APR and APR-Util because CentOS’s versions aren’t compatible with the latest version of apache. Visit http://apr.apache.org/download.cgi to get the URL for the latest versions, then use wget as shown below.
Now we want to put the apr and apr-util we downloaded into our apache source files.
Compile
Sweet, now it’s time to compile. We want to use –enable-ssl –enable-so –with-mpm=prefork –with-included-apr
Enable SSL in httpd.conf
Apache configuration file httpd.conf is located under /usr/local/apache2/conf.
Uncomment the httpd-ssl.conf Include line and the LoadModule ssl_module line in the /usr/local/apache2/conf/httpd.conf file.
View the httpd-ssl.conf to review all the default SSL configurations. For most cases, you don’t need to modify anything in this file.
Latest Httpd Version
The SSL certificate and key are required before we start the Apache. The server.crt and server.key file mentioned in the httpd-ssl.conf needs to be created before we move forward.
Generate server.crt and server.key file
First, Generate the server.key using openssl.
The above command will ask for the password. Make sure to remember this password. You need this while starting your Apache later.
Next, generate a certificate request file (server.csr) using the above server.key file.
Finally, generate a self signed ssl certificate (server.crt) using the above server.key and server.csr file.
Copy the server.key and server.crt file to appropriate Apache configuration directory location.
Start Apache
If you are getting the below error message, make sure to uncomment the line shown below in httpd.conf.
If you are getting the below error message, make sure to uncomment the line shown below in httpd.conf.
Finally, this will prompt you to enter the password for your private key before starting up the apache.
Verify that the Apache httpd process is running in the background.
To stop apache, use apachectl stop.
Use httpd -l to view all the modules that are compiled inside the Apache httpd daemon.
By default Apache SSL runs on 443 port. Open a web browser and verify that you can access your Apache using https://{your-ip-address}
Add apache bin folder to $PATH
Now for the sake of convenience, we’re going to add the directory for apache binaries (apachectl, httpd, etc.) to the $PATH variable so that you don’t have to type /usr/local/apache2/bin/whatever each time.
Now, reload the profile by either logging out and back in, or by running:
That will reload the $PATH variable.
Httpd Latest Version Download
Yeah, not too bad at all now that you know what you’re doing.