Python+Apache环境搭建
2021-02-05 21:15
标签:module grant wsgi http ali 一个 ted apache2 over Python+apache搭建时需要apache拓展mod_wsgi模块,apache启动时自动加载mod_wsgi模块,通过mod_wsgi与python通信,实现python部署在apache上。 Python+Apache环境搭建 标签:module grant wsgi http ali 一个 ted apache2 over 原文地址:https://www.cnblogs.com/jmtang/p/12785738.htmlPython+Apache环境搭建
安装
tar zxvf mod_wsgi-4.6.8.tar.gz -C .
cd mod_wsgi-4.6.8
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/python3/bin/python3.7
make && make install
配置
vim /usr/local/apache2/conf/httpd.conf LoadModule wsgi_module modules/mod_wsgi.so
vim /usr/local/apache2/conf/extra/http-ssl.conf
加入python所在位置WSGIPythonHome /usr/local/python3
vim /usr/local/apache2/conf/extra/http-ssl.conf
上一篇:Java中的封装