标签:module grant wsgi http ali 一个 ted apache2 over
Python+apache搭建时需要apache拓展mod_wsgi模块,apache启动时自动加载mod_wsgi模块,通过mod_wsgi与python通信,实现python部署在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
WSGIPythonHome /usr/local/python3
vim /usr/local/apache2/conf/extra/http-ssl.conf
<VirtualHost *:9052>
WSGIScriptAlias / 路径/htdocs/myapp/runapp.wsgi
<Directory /路径/htdocs/myapp>
AllowOverride AuthConfig FileInfo
Require all granted
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
标签:module grant wsgi http ali 一个 ted apache2 over
原文地址:https://www.cnblogs.com/jmtang/p/12785738.html