Python中文
首页
教程
问答
标签
搜索
登录
注册
mod\wsgi python conf pars模块
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我设置了Flask,这是一个pythonweb微框架,位于apache和mod wsgi下。在</p> <p>除了python confparser之外,该应用程序运行良好。这不会出错:</p> <pre><code>parser = ConfigParser.ConfigParser() parser.read('snati.con') </code></pre> <p>但当我加上:</p> ^{pr2}$ <p>我得到了<em>内部服务器错误</em>错误.log阿帕奇的</p> <p>我也试过:</p> <pre><code>file = open("sample.txt") </code></pre> <p>同样的结果。在</p> <p>一定有一些配置问题,但我找不到。在</p> <p>我的apache conf看起来像:</p> <pre><code>WSGIRestrictStdout Off <VirtualHost *:80> ServerName my.com WSGIDaemonProcess myapp user=me group=me threads=5 WSGIScriptAlias / /home/me/www/myapp.wsgi <Directory /home/me/www/myapp > WSGIProcessGroup myapp WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> </VirtualHost> </code></pre> <p>我的应用程序.wsgi在</p> <pre><code>#active the python virtualenv for this application activate_this = '/home/gilles/www/snati/env/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) import sys sys.path.insert(0, '/home/gilles/www/snati/src') sys.stdout = sys.stderr from app import app as application </code></pre> <p>什么可能是错误的?为什么我不能在Apache日志中得到错误?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>将路径添加到带有home变量的apache设置文件中</p> <pre><code>WSGIDaemonProcess myapp user=me group=me threads=5 home=/path/to/your/directory </code></pre> <p>这将更改进程的工作目录。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
4 回答
文本小部件:在没有输入时更新并在循环后保持空闲
5 回答
文本小部件tkin
2 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
1 回答
文本小部件tkinter复制图像选项
5 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
2 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
7 回答
文本小部件不显示lis中的内容
2 回答
文本小部件不显示Unicode字符
9 回答
文本小部件中写入的行间距
9 回答
文本小部件中的文本作为变量
5 回答
文本小部件中的滚动条仅显示在底部
5 回答
文本小部件中的选项卡键空间计数
2 回答
文本小部件作为Lis
4 回答
文本小部件在主框架中扩展列宽
2 回答
文本小部件未使用删除功能清除
6 回答
文本小部件滚动动画(Tkinter、Python)
6 回答
文本居中。格式正确吗?
1 回答
文本差分算法
7 回答
文本已知时音频文件中的单词索引
9 回答