我正在为Centos 7寻找mod_wsgi的python3版本。 我知道对于fedora,它是python3-mod_wsgi,而ubuntu是libapache2-mod-wsgi-py3。但是,我无法找到Centos 7的等价物。我需要这个包用于我的django网站。
答案 0 :(得分:0)
CentOS 7.3没有针对Python 3编译的mod_wsgi包。
您可以使用pip自行编译模块:
sudo yum install httpd-devel gcc
pip install mod_wsgi
# Becoming root makes it easier to echo to a file in /etc/httpd
sudo -i
echo "LoadModule wsgi_module [path-to-your-virtual-environment]/lib/python3.4/site-packages/mod_wsgi/server/mod_wsgi-py34.cpython-34m.so" > /etc/httpd/conf.modules.d/00-wsgi.conf
exit
sudo systemctl restart httpd