1

I am not able to enable/load module mod_wgsi in apache webserver in cent os 8 VPS. It works very easily in ubuntu by running the command sudo apt install libapache2-mod-wsgi-py3 Please Help me getting set up apache for django in centos 8 by letting me know how to enable the mod_wsgi for apache. Your Help is Highly Appreciated.

The Commands I have run initially:

sudo yum update
sudo yum install python3-pip python3-devel httpd httpd-devel
pip3 install mod_wsgi

2 Answers2

2

First, you need to erase your VPS and start over with a fresh installation of CentOS 8, because you have run pip3 install mod_wsgi and trying to clean up from this (if it's even possible) will take significantly longer than just starting fresh.

Next, you need to choose whether you want Python 3.6 or Python 3.8. By default Python 3.6 will be used, but you can switch to Python 3.8 by enabling its AppStream:

dnf module enable python38

If you chose to remain on Python 3.6, then install the python3-mod_wsgi package. If you chose to go with Python 3.8, then install the python38-mod_wsgi package.

dnf install python38-mod_wsgi
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thanks a lot. Indeed It worked!. But I am not yet able to successfully deploy django website in centos apache using Ubuntu Server knowledge alone. But anyway The mod_wsgi part I asked is solved very smoothly following your given steps, thanks a lot. :) – Manav Sengupta Oct 03 '20 at 09:57
1

please check this blog -

https://dataengee.blogspot.com/2022/04/django-server-setup-with-apache-with.html

it has the basic setup