I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).
I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.
I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I’m new to Linux so I’m a bit confused when applying the same on Amazon EC2 instance.
That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.
2
Answers
After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:
Login to your Linux instance and perform the regular system updates first
Stop the running web server
Create backup of the existing httpd by using command:
Remove any existing PHP packages
Remove old web server installs
Update yum package repository
Install Apache 2.4
Install PHP 7 packages
Install a new version of mod_ssl
I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.
Finally all I needed to do is start my web server
That's it.
Do retain that the solution by MrGoogle will reset any configuration in existence in the hpptd service.
You will probably need to reconfigure some settings…
I had to reconfigure mod_rewrite and .htaccess File for apache:
https://devops.ionos.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/