From a937c65931ac9e852c6fc91eb366f0240b4d2887 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Thu, 12 Aug 2004 20:51:15 +0000 Subject: [PATCH] Add www/mod_fcgid, an alternative FastCGI module for Apache2. mod_fcgid has a new process management strategy, which concentrates on reducing the number of fastcgi server, and kick out the corrupt fastcgi server as soon as possible. The bad news is that it does not currently support suEXEC, and the good news is that it has PHP support. Check out the web site for details. Licence: GPL WWW: http://fastcgi.coremail.cn/ --- www/Makefile | 1 + www/mod_fcgid/Makefile | 27 +++++++++++++++++++++ www/mod_fcgid/distinfo | 2 ++ www/mod_fcgid/files/patch-fcgid_conf.c | 11 +++++++++ www/mod_fcgid/files/patch-fcgid_proc_unix.c | 7 ++++++ www/mod_fcgid/pkg-descr | 12 +++++++++ www/mod_fcgid/pkg-message | 10 ++++++++ www/mod_fcgid/pkg-plist | 4 +++ 8 files changed, 74 insertions(+) create mode 100644 www/mod_fcgid/Makefile create mode 100644 www/mod_fcgid/distinfo create mode 100644 www/mod_fcgid/files/patch-fcgid_conf.c create mode 100644 www/mod_fcgid/files/patch-fcgid_proc_unix.c create mode 100644 www/mod_fcgid/pkg-descr create mode 100644 www/mod_fcgid/pkg-message create mode 100644 www/mod_fcgid/pkg-plist diff --git a/www/Makefile b/www/Makefile index e4c5d37bf9eb..50429f0c9b95 100644 --- a/www/Makefile +++ b/www/Makefile @@ -262,6 +262,7 @@ SUBDIR += mod_extract_forwarded SUBDIR += mod_extract_forwarded2 SUBDIR += mod_fastcgi + SUBDIR += mod_fcgid SUBDIR += mod_filter SUBDIR += mod_frontpage SUBDIR += mod_geoip diff --git a/www/mod_fcgid/Makefile b/www/mod_fcgid/Makefile new file mode 100644 index 000000000000..9254b2cd378b --- /dev/null +++ b/www/mod_fcgid/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: mod_fcgid for Apache2 +# Date created: 13 August 2004 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= mod_fcgid +PORTVERSION= 0.80 +CATEGORIES= www +MASTER_SITES= http://fastcgi.coremail.cn/ +DISTNAME= ${PORTNAME}.${PORTVERSION} + +MAINTAINER= knu@FreeBSD.org +COMMENT= An alternative FastCGI module for Apache2 + +USE_APACHE= yes +WITH_APACHE2= yes +MAKE_ARGS= top_dir="${LOCALBASE}/share/apache2" INCLUDES="-I${LOCALBASE}/include/apache2" +INSTALL_TARGET= install-modules + +post-install: + ${MKDIR} -m 700 /var/run/fcgidsock + ${CHOWN} www:www /var/run/fcgidsock + @${CAT} ${PKGMESSAGE} + +.include diff --git a/www/mod_fcgid/distinfo b/www/mod_fcgid/distinfo new file mode 100644 index 000000000000..f69170e65191 --- /dev/null +++ b/www/mod_fcgid/distinfo @@ -0,0 +1,2 @@ +MD5 (mod_fcgid.0.80.tar.gz) = 553cf737f242cc657d9fab0c6e62602f +SIZE (mod_fcgid.0.80.tar.gz) = 43616 diff --git a/www/mod_fcgid/files/patch-fcgid_conf.c b/www/mod_fcgid/files/patch-fcgid_conf.c new file mode 100644 index 000000000000..6255ce049ecc --- /dev/null +++ b/www/mod_fcgid/files/patch-fcgid_conf.c @@ -0,0 +1,11 @@ +--- fcgid_conf.c.orig Mon Jul 26 07:08:03 2004 ++++ fcgid_conf.c Fri Aug 13 05:04:44 2004 +@@ -15,7 +15,7 @@ + #define DEFAULT_ERROR_SCAN_INTERVAL 3 + #define DEFAULT_ZOMBIE_SCAN_INTERVAL 3 + #define DEFAULT_PROC_LIFETIME (60*60) +-#define DEFAULT_SOCKET_PREFIX "logs/fcgidsock" ++#define DEFAULT_SOCKET_PREFIX "/var/run/fcgidsock" + #define DEFAULT_SPAWNSOCRE_UPLIMIT 10 + #define DEFAULT_SPAWN_SCORE 1 + #define DEFAULT_TERMINATION_SCORE 2 diff --git a/www/mod_fcgid/files/patch-fcgid_proc_unix.c b/www/mod_fcgid/files/patch-fcgid_proc_unix.c new file mode 100644 index 000000000000..a3dbe8ba2ef5 --- /dev/null +++ b/www/mod_fcgid/files/patch-fcgid_proc_unix.c @@ -0,0 +1,7 @@ +--- arch/unix/fcgid_proc_unix.c.orig Mon Jul 26 07:08:03 2004 ++++ arch/unix/fcgid_proc_unix.c Fri Aug 13 04:53:49 2004 +@@ -1,3 +1,4 @@ ++#include + #include + #include "httpd.h" + #include "apr_thread_proc.h" diff --git a/www/mod_fcgid/pkg-descr b/www/mod_fcgid/pkg-descr new file mode 100644 index 000000000000..884c78da7935 --- /dev/null +++ b/www/mod_fcgid/pkg-descr @@ -0,0 +1,12 @@ +mod_fcgid -- an alternative FastCGI module for Apache2 + +mod_fcgid has a new process management strategy, which concentrates on +reducing the number of fastcgi server, and kick out the corrupt +fastcgi server as soon as possible. + +The bad news is that it does not currently support suEXEC, and the +good news is that it has PHP support. Check out the web site for +details. + +Licence: GPL +WWW: http://fastcgi.coremail.cn/ diff --git a/www/mod_fcgid/pkg-message b/www/mod_fcgid/pkg-message new file mode 100644 index 000000000000..17a13263fc35 --- /dev/null +++ b/www/mod_fcgid/pkg-message @@ -0,0 +1,10 @@ +************************************************************ +To enable this module, add something like the following +lines to your server configuration file: + + LoadModule fcgid_module libexec/apache2/mod_fcgid.so + + + AddHandler fcgid-script .fcgi + +************************************************************ diff --git a/www/mod_fcgid/pkg-plist b/www/mod_fcgid/pkg-plist new file mode 100644 index 000000000000..bc85ebc4c2fc --- /dev/null +++ b/www/mod_fcgid/pkg-plist @@ -0,0 +1,4 @@ +libexec/apache2/mod_fcgid.so +@exec /bin/mkdir -p -m 700 /var/run/fcgidsock +@exec /bin/chown www:www /var/run/fcgidsock +@unexec /bin/rmdir /var/run/fcgidsock 2>/dev/null || true