使用mod_wsgi设置SSL证书

时间:2016-03-01 14:34:54

标签: django apache ssl https mod-wsgi

我使用Python 3.3开发了一个Django 1.8应用程序。我正在尝试使用Red Hat Enterprise Linux Server 7.2(Maipo)在大学专用服务器上部署该应用程序。 (注意:RHEL不允许我安装较新版本的Django和Python)

我使用RHEL Apache安装mod_wsgi时遇到了困难,我最终安装了:

pip install -U mod_wsgi-httpd
pip install mod_wsgi

当我使用以下设置时,一切都很完美:

python manage.py runmodwsgi --setup-only --port=80 --user=iman --group=root --server-root=/etc/mod_wsgi-express-80

但是,当我想设置HTTPS时,使用以下设置不会返回任何错误消息,但网站既不显示http://也不显示https://前缀。

python manage.py runmodwsgi --setup-only --port=80 --user=iman --group=root --server-root=/etc/mod_wsgi-express-80 --https-only --https-port=443 --ssl-certificate-file=/etc/sslcert/iman.crt --ssl-certificate-key-file=/etc/sslcert/private/iman.key --ssl-ca-certificate-file=/etc/sslcert/certs/ca-bundle.crt --server-name=iman123.university.edu

以下是我发现的有关mod_wsgi的有用资源:

mod_wsgi docs

GitHub repository

Running HTTPS and client authentication with mod_wsgi-express

pip install mod_wsgi-express left out mod_ssl.so

非常感谢您的时间和关注,如果我做错了事,请提前道歉。

0 个答案:

没有答案
相关问题