废话不多说,直接开始 。
背景:身为QA人员 一直想把工作一系列的方便的高效的方法与脚本分享给其余的QA人员,但是无奈与水平参差不齐,为了更好的服务与QA人员 ,最近在写一个QA管理
系统,使用的是 flask ,但是由于环境的限制不能部署到 系统 (主要是懒不想搞环境) ,决定在window上进行部署 。
方法 : 百度 搜索到此文章 , 。(方法主要来源此)
版本:win 64 , 2.7 64 , mod_wsgi 64 , Apache 64
工具:Python + flask + mod_wsgi + Apache
工具下载路径 (如果是64位 ) : 只提供 mod_wsgi + Apache () (非64位的,参考 步骤方法中的 链接)
参考这个 文章 主要遇到的问题 :
You don't have permission to access /flasktest/hello on this server.You don't have permission to access /flasktest/hello on this server.
修改方法 :
1. 进入 Apache 的 conf/httpd.conf 配置文件 修改文件访问权限:
AllowOverride none Require all denied
修改为:
#AllowOverride none #Require all denied
对于原文章中的站点 virtualhost 配置 最好不要在 httpd.conf 中配置 ,Apache 有 httpd-vhosts.conf 配置文件,
具体配置方法 :
ServerAdmin example@company.com DocumentRoot D:\work\QA Order allow,deny Allow from all WSGIScriptAlias /qa D:\work\QA\QA.wsgi
Copy 到 conf/extra/httpd-vhosts.conf 并且 在把 httpd.conf 中如下配置的注释去掉:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf