标签:
httpd : http://httpd.apache.org/
apr & apr-util : https://apr.apache.org/
$ ./configure --prefix=/usr/local/apr $ make & sudo make install
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make & sudo make install
$ ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --sysconfdir=/etc/ --enable-modules=all --enable-mpms-shared=all $ make & sudo make install
1. 下载mod_wsgi.so模块文件 : http://code.google.com/p/modwsgi
2. 编译安装:
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/bin/python $ make & sudo make install
3. 配置 httpd.conf 文件 :
LoadModule wsgi_module modules/mod_wsgi.so <IfModule wsgi_module> WSGIScriptAlias /webapp /var/www/webpy-app/code.py/ Alias /webapp/static /var/www/webpy-app/static/ AddType text/html .py <Directory /var/www/webpy-app/> AllowOverride all Options Indexes FollowSymLinks ExecCGI Order deny,allow SetHandler wsgi-script Allow from all </Directory> </IfModule> ServerName 127.0.1.1:80
PS : 将 Request 注释,如下 :
<Directory /> AllowOverride none # Require all denied </Directory>
Apache + mod_wsgi (Python)部署webpy应用
标签:
原文地址:http://www.cnblogs.com/naray/p/4225807.html