打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
在apache下添加fastcgi模块
1、搭建环境
CentOS5.1,系统只带的apache2.23,默认的apache安装没有带fastcgi模块,要自己手动添加

2、下载
# wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz

3、安装
# tar zxf mod_fastcgi-2.4.6.tar.gz
# cd mod_fastcgi-2.4.6
# apxs -o mod_fastcgi.so -c *.c
# apxs -i -a -n fastcgi .libs/mod_fastcgi.so
看看modules是否有mod_fastcgi.so,看看httpd.conf文件里是否有mod_fastcgi.so
再看看httpd.conf里是否有下面这行,没有加上
AddHandler fastcgi-script .fcg .fcgi .fpl


PS:所有都是看源安装目录下的INSTALL文件。

4、apache相关配置


<IfModule mod_fastcgi.c>
    FastCgiWrapper /usr/local/apache/bin/suexec
    # URIs that begin with /fcgi-bin/, are found in /var/www/fcgi-bin/
    Alias /fcgi-bin/ /var/www/fcgi-bin/
    ScriptAlias /wws /var/www/fcgi-bin/b.fcgi
    # Anything in here is handled as a "dynamic" server if not defined as "static" or "external"
    <Directory /var/www/fcgi-bin/>
                AllowOverride None
                Options +ExecCGI -Includes
                #SetHandler fastcgi-script
                AddHandler fastcgi-script .fcg .fcgi
                Order allow,deny
                Allow from all
    </Directory>

    # Anything with one of these extensions is handled as a "dynamic" server if not defined as
    # "static" or "external". Note: "dynamic" servers require ExecCGI to be on in their directory.
    #AddHandler fastcgi-script .fcgi .fpl

    # Start a "static" server at httpd initialization inside the scope of the SetHandler
    #FastCgiServer /var/www/fcgi-bin/echo -processes 3

    # Start a "static" server at httpd initialization inside the scope of the AddHandler
    #FastCgiServer /var/www/fcgi-bin/b.fcgi -processes 3 -user nobody -group nobody
    #FastCgiServer /var/www/htdocs/some/path/echo.fcgi
    # Start a "static" server at httpd initialization outside the scope of the Set/AddHandler
    #FastCgiServer /var/www/htdocs/some/path/coolapp
    #<Directory /var/www/htdocs/some/path/coolapp>
    # SetHandler fastcgi-script
    #</Directory>

</IfModule>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Apache rewrite技术实现Apache到lighttpd迁移
Linux apache + fastcgi 运行c/c++
Postfix邮箱【十一】:Webmail支持FCGI和SSL
HowTo configure Apache to run Redmine
linux下fcgi安装
用Apache+mod_wsgi部署python程序
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服