[已解决]python apache2 fcgid 问题

今天想试用一下python fcgid 装好以后发现
执行cgi脚本无效,错误日志如下:
编译fcgid的时候参考 [url]http://blog.brandonking.net/?p=34[/url]
在Makefile 中添加了
CFLAGS = -arch ppc -arch ppc64 -arch i386 -arch x86_64

[Wed Oct 29 10:17:03 2008] [emerg] (13)Permission denied: mod_fcgid: can't get lock, pid: 15556
[Wed Oct 29 10:17:03 2008] [emerg] (13)Permission denied: mod_fcgid: can't get lock, pid: 15555
[Wed Oct 29 10:17:04 2008] [error] mod_fcgid: fcgid process manager died, restarting the server
向各位英雄请教,小弟先行谢过~

Apache config:


LoadModule fcgid_module modules/mod_fcgid.so

<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi .fpy .fcg
SocketPath /Applications/xampp/xamppfiles/temp/fcgid_sock
SharememPath /Applications/xampp/xamppfiles/temp/fcgid_shm
IPCConnectTimeout 20
Alias /fcgi /Applications/xampp/xamppfiles/fcgi-bin/
<Directory "/Applications/xampp/xamppfiles/fcgi-bin">
SetHandler fcgid-script
# FCGIWrapper "/usr/bin/env python2.5" .py
DirectoryIndex index.html index.py index.pl index.php
Options +ExecCGI +FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</IfModule>


test.fcgi 脚本内容如下,已经装好flup包了

#!/usr/bin/env python2.5
try:
from flup.server.fcgi import WSGIServer

def myapp(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello World!\n']

WSGIServer(myapp).run()

except Exception, e:
print 'Content-Type: text/plain\r\n\r\n',
print 'Oops...'
print
print 'Trac detected an internal error:'
print
print e
print


问题已经解决了
确实是权限问题
修改httpd.conf的

User nobody
Group admin




User www
Group www


就OK了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值