废话很少说,直接开始 。python
背景:身为QA人员 一直想把工做一系列的方便测试的高效的方法与脚本分享给其他的QA人员,可是无奈与水平良莠不齐,为了更好的服务与QA人员 ,最近在写一个QA管理linux
系统,使用的是 flask ,可是因为环境的限制不能部署到Linux 系统 (主要是懒不想搞环境) ,决定在window上进行部署 。flask
方法 : 百度 搜索到此文章 ,http://blog.csdn.net/firefox1/article/details/46438769 。(方法主要来源此)ide
版本:win 64 , Python 2.7 64 , mod_wsgi 64 , Apache 64工具
工具:Python + flask + mod_wsgi + Apache 测试
工具下载路径 (若是是64位 ) : 只提供 mod_wsgi + Apache (http://pan.baidu.com/s/1gePLHJX) (非64位的,参考 步骤方法中的 连接)ui
参考这个 文章 主要遇到的问题 : http://blog.csdn.net/firefox1/article/details/46438769this
You don't have permission to access /flasktest/hello on this server.You don't have permission to access /flasktest/hello on this server. .net
修改方法 : firefox
1. 进入 Apache 的 conf/httpd.conf 配置文件 修改文件访问权限:
<Directory /> AllowOverride none Require all denied </Directory>
修改成:
<Directory /> #AllowOverride none #Require all denied </Directory>
对于原文章中的站点 virtualhost 配置 最好不要在 httpd.conf 中配置 ,Apache 有 httpd-vhosts.conf 配置文件,
具体配置方法 :
<VirtualHost *:80 > ServerAdmin example@company.com DocumentRoot D:\work\QA <Directory "D:\work\QA"> Order allow,deny Allow from all </Directory> WSGIScriptAlias /qa D:\work\QA\QA.wsgi </VirtualHost>
Copy 到 conf/extra/httpd-vhosts.conf 而且 在把 httpd.conf 中以下配置的注释去掉:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf