在运行cPanel的CentOS 7服务器上安装mod_fastcgi

时间:2018-07-16 20:11:35

标签: cpanel centos7 mod-fastcgi

我正在尝试将网站从CentOS 6.8 cPanel服务器移至CentOS 7 cPanel服务器。运行它的CMS的要求之一是mod_fastcgi(不是mod_fcgid,我需要外部服务器类型)。我确实记得,一两年前在6.8机上工作有点麻烦,但是在7机上似乎变得相当棘手。

一些可能相关的基本服务器和软件包信息:

[root@pontiacnew ~]# cat /etc/lsb-release 
DISTRIB_ID=CentOS
DISTRIB_RELEASE=7
DISTRIB_CODENAME=
DISTRIB_DESCRIPTION=
[root@pontiacnew ~]# uname -r
4.9.103-xxxx-std-ipv6-64
[root@pontiacnew ~]# rpm -q ea-apache24
ea-apache24-2.4.33-8.8.1.cpanel.x86_64
[root@pontiacnew ~]# rpm -q ea-apache24-devel
ea-apache24-devel-2.4.33-8.8.1.cpanel.x86_64

按照此处(和其他地方)的说明进行操作: https://www.cyberciti.biz/tips/rhel-centos-fedora-apache2-fastcgi-php-configuration.html

...我从此镜像下载了mod_fastcgi源: https://github.com/FastCGI-Archives/FastCGI.com/blob/master/original_snapshot/mod_fastcgi-SNAP-0910052141.tar.gz

...,然后将Makefile.AP2复制到Makefile,并编辑top_dir行以指向/ usr / lib64 / apache2-这是整个文件:

[root@pontiacnew mod_fastcgi-SNAP-0910052141]# cat Makefile
#
#  Makefile for Apache2
#

builddir     = .

top_dir      = /usr/lib64/apache2

top_srcdir   = ${top_dir}
top_builddir = ${top_dir}

include ${top_builddir}/build/special.mk

APXS      = apxs
APACHECTL = apachectl

#DEFS=-Dmy_define=my_value
#INCLUDES=-Imy/include/dir
#LIBS=-Lmy/lib/dir -lmylib

all: local-shared-build

clean:
    -rm -f *.o *.lo *.slo *.la 

然后,我尝试仅使用make来构建模块,如下所示:

[root@pontiacnew mod_fastcgi-SNAP-0910052141]# make

其中的完整输出为13704行,这超出了后长度限制,因此我将其上传到此处:http://denny.me/share/stack/make.output

似乎几乎完全是与/usr/include/apache2/http_log.h和/usr/include/apache2/http_config.h有关的错误

这是它的最后15行:

mod_fastcgi.c:2923:5: warning: passing argument 5 of 'ap_log_rerror_' makes integer from pointer without a cast [enabled by default]
In file included from fcgi.h:28:0,
                 from mod_fastcgi.c:72:
/usr/include/apache2/http_log.h:456:18: note: expected 'apr_status_t' but argument is of type 'struct request_rec *'
 AP_DECLARE(void) ap_log_rerror_(const char *file, int line, int module_index,
                  ^
mod_fastcgi.c:2923:5: warning: passing argument 6 of 'ap_log_rerror_' from incompatible pointer type [enabled by default]
     ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r, "FastCGI: access denied: %s", r->uri);
     ^
In file included from fcgi.h:28:0,
                 from mod_fastcgi.c:72:
/usr/include/apache2/http_log.h:456:18: note: expected 'const struct request_rec *' but argument is of type 'char *'
 AP_DECLARE(void) ap_log_rerror_(const char *file, int line, int module_index,
                  ^
make: *** [mod_fastcgi.slo] Error 1

所以这就是我现在被困住的地方

是否还有其他人使用cPanel和EasyApache在CentOS 7上使用mod_fastcgi?还是有人对我下一步应该尝试的建议有什么建议?

谢谢!

0 个答案:

没有答案