`
rikugun
  • 浏览: 346728 次
  • 性别: Icon_minigender_1
  • 来自: 南宁
社区版块
存档分类
最新评论

[已解决]python apache2 fcgid 问题

阅读更多
今天想试用一下python fcgid 装好以后发现
执行cgi脚本无效,错误日志如下:
编译fcgid的时候参考 http://blog.brandonking.net/?p=34
在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了
分享到:
评论
5 楼 mingliangfeng 2009-01-17  
我在浪点的虚拟主机上也遇到这个问题,但是我没有权限修改httpd.conf,请问还有没有其它方法来解决?
4 楼 bohemia 2008-11-26  
如果用FCGI, 用lightTPD或者nginx,也许也不错.
3 楼 rikugun 2008-10-31  
问题已经解决了
确实是权限问题
修改httpd.conf的
User nobody
Group admin


User www
Group www

就OK了
2 楼 rikugun 2008-10-30  
bohemia 写道

Permission denied: mod_fcgid: can't get lock, pid: 15556

不会又是权限问题吧?


不会吧我是用root启动apache的噢
1 楼 bohemia 2008-10-29  
Permission denied: mod_fcgid: can't get lock, pid: 15556

不会又是权限问题吧?

相关推荐

    Apache2.4 Win64位

    apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下 打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?” 完整代码如下 .htaccess ...

    mod_fcgid-2.3.9.tar.bz2

    Apache mod_fcgid 用于 Apache HTTP Server 的 FastCGI 模块作为 2.3.9 发布。

    mod_fcgid-2.3.6-win32-x86.zip

    windows 下 apache 开启fcgid模式 的mod_fastcgi.dll

    mod_fcgid-2.3.9.tar.gz

    Apache mod_fcgid 用于 Apache HTTP Server 的 FastCGI 模块作为 2.3.9 发布

    apache和C++实现fastcgi时Apache中httpd.conf的配置

    apache和C++实现fastcgi时Apache中httpd.conf的配置

    mod_fcgid-2.3.9_x86

    32位Apache FCGID模块,已确认切实可用,验证Apache版本:2.4

    mod_fcgid-2.3.9_windows_x64

    mod_fcgid-2.3.9 x64 适用于Windows平台Apache 2.4 亲测可用

    mod_fcgid.so

    win10下编译 apache2.4的fcgid模块,X64平台。 用于window下多个虚拟主机配置不同php版本等情景 注意:PHP的地址不能包含空格,比如Program Files这样的路径,不然有问题,至于为什么,我也不知道

    Apache 2.4.39 Win64

    Windows 环境 Apache 最新下载 Apache 2.4.39 Win64 httpd-2.4.39-win64-VC15

    Apache FastCGI 配置过程小记

    对于配置过程其实比较简单只是纠结于在win32环境下apache 模块 mod_fcgid由于管道问题无法达成,而mod_fastcgi模块则可以达成

    mod_fcgid-2.3.9

    安装redmine2.5.3必不可少的资源 安装手册参考http://blog.csdn.net/justflow/article/details/44346389

    Apache2.2 + FastCGI + gSOAP搭建 WebService工具

    Apache2.2 + FastCGI + gSOAP搭建 WebService工具,内含: 1、fcgi-2.4.1-SNAP-0910052249.tar.gz 2、mod_fcgid-2.3.9-crlf.zip 3、httpd-2.2.25-win32-x86-openssl-0.9.8y.msi

    apache安装依赖包

    apr-1.6.3.tar.gz;apr-util-1.6.0.tar.bz2;httpd-2.4.29.tar.gz;mod_fcgid-2.3.9.tar.gz;pcre2-10.30.zip;五合一

    由Apache 500错误引出的临时文件问题分析解决

    查看apache日志,发觉是mod_fcgid模块异常,提示”Connection reset by peer:mod_fcgid:error reading data from FastCGI server”、”Premature end of script headers:index.php”、”process /usr/… apache/cgi-...

    mod_fcgid-开源

    它是Apache模块mod_fastcgi的二进制兼容性替代方案。 mod_fcgid具有新的进程管理策略,该策略专注于减少fastcgi服务器的数量,并尽快踢出损坏的fastcgi服务器。

    mod-fcgid-2.3.9-windows-x64

    Win环境下安装Apache2+fastcgi+php5(non thread safe)+MySql5+ZendGuardLoader

    mod_fcgid-2.3.10-win32-VS16_javascript_socket_MOD_

    socjet initialize and transmitdata by socket.\its very usefull

    Apache 2.4 modules VS16.zip

    Apache 2.4 modules VS16模块(dbd_modules,mod_bw,mod_evasive,mod_fcgid,mod_jk,mod_log_rotate,mod_security,mod_view,mod_watch,mod_xsendfile),从官网下载的全部模块,包含X86和X64,仅做搬运工!

Global site tag (gtag.js) - Google Analytics