快捷导航

云服务器在apache下添加fastcgi模块

[复制链接]
查看: 650|回复: 0
发表于 2023-6-29 15:34:43 | 显示全部楼层 |阅读模式
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相关配置


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"


AllowOverride None

Options +ExecCGI -Includes

#SetHandler fastcgi-script

AddHandler fastcgi-script .fcg .fcgi

Order allow,deny

Allow from all


# 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

#

# SetHandler fastcgi-script

#


复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

精彩推荐

尚云驿站

  • 投诉建议:350467567@qq.com
  • 软文投稿:350467567@qq.com
  • 友情链接:350467567@qq.com

云服务支持

精彩文章,快速检索

Copyright 尚云驿站  Powered by©  技术支持:飛    ( 闽ICP备2025116718号-15 )