I have a VPS server with CentOS 7. I have on it two PHP websites working OK on several VirtualHosts and now I want to deploy a Django (Python3) project, so I need mod_wsgi module.
If I do systemctl status httpd
I get this response so Apache is installed and running (and serving my PHP websites).
But if I do yum install mod_wsgi
CentOS tell me that I need to install httpd package. If I install the httpd package, then the PHP not works and can’t start httpd service anymore.
If I execute whereis httpd
I get httpd: /opt/apache/bin/httpd /opt/ferozo/bin/httpd
2
Answers
I get it solved without reinstalling entire httpd.
yum update -y
./configure
systemctl restart httpd
and now Apache is running with mod_wsgi module enabled!Take backup before doing this. (I am not responsible for any data loss)
You will have to copy your config files to /etc/httpd after doing the following commands. You will have to setup everything again.
First remove the version of apache you are using.
You will have to reinstall apache using:
And then install mod_wsgi using:
And to install PHP: