mod_fastcgi is a module for the Apache webserver that implements
the FastCGI protocol. ok alek@
This commit is contained in:
parent
7fe9eee4bf
commit
8fe74e69e8
40
www/mod_fastcgi/Makefile
Normal file
40
www/mod_fastcgi/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2005/02/14 06:23:23 mbalmer Exp $
|
||||
|
||||
# This port currently only works with archs supporting dynamic loading
|
||||
# and has Apache that supports DSO's.
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= "Apache FastCGI module"
|
||||
|
||||
DISTNAME= mod_fastcgi-2.4.2
|
||||
CATEGORIES= www
|
||||
|
||||
HOMEPAGE= http://www.fastcgi.com/
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}dist/
|
||||
|
||||
MAINTAINER= Marc Balmer <mbalmer@openbsd.org>
|
||||
|
||||
# Proprietary license
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
do-build:
|
||||
(cd ${WRKBUILD}; apxs -o mod_fastcgi.so -c *.c)
|
||||
|
||||
post-build:
|
||||
sed 's,!!PREFIX!!,${PREFIX},' \
|
||||
< ${FILESDIR}/mod_fastcgi-enable \
|
||||
> ${WRKBUILD}/mod_fastcgi-enable
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKBUILD}/mod_fastcgi.so ${PREFIX}/lib
|
||||
${INSTALL_SCRIPT} ${WRKBUILD}/mod_fastcgi-enable ${PREFIX}/sbin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_fastcgi
|
||||
${INSTALL_DATA} ${WRKBUILD}/docs/* ${PREFIX}/share/doc/mod_fastcgi
|
||||
|
||||
.include <bsd.port.mk>
|
4
www/mod_fastcgi/distinfo
Normal file
4
www/mod_fastcgi/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
MD5 (mod_fastcgi-2.4.2.tar.gz) = e994414304b535cb99e10b7d1cad1d1e
|
||||
RMD160 (mod_fastcgi-2.4.2.tar.gz) = 83c01567bb9a6d39345573137408615260972e1e
|
||||
SHA1 (mod_fastcgi-2.4.2.tar.gz) = a56be62a3f08262ae187989f5dacb3464a030e2e
|
||||
SIZE (mod_fastcgi-2.4.2.tar.gz) = 98295
|
18
www/mod_fastcgi/files/mod_fastcgi-enable
Normal file
18
www/mod_fastcgi/files/mod_fastcgi-enable
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: mod_fastcgi-enable,v 1.1.1.1 2005/02/14 06:23:23 mbalmer Exp $
|
||||
|
||||
MODULE=!!PREFIX!!/lib/mod_fastcgi.so
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "You must be root to run this script."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f ${MODULE} ]; then
|
||||
echo "Cannot find mod_fastcgi module (${MODULE})"
|
||||
exit 1
|
||||
else
|
||||
echo "Enabling FastCGI module..."
|
||||
/usr/sbin/apxs -i -a -n fastcgi ${MODULE}
|
||||
fi
|
41
www/mod_fastcgi/patches/patch-fcgi_pm_c
Normal file
41
www/mod_fastcgi/patches/patch-fcgi_pm_c
Normal file
@ -0,0 +1,41 @@
|
||||
--- fcgi_pm.c.orig Thu Oct 30 02:08:34 2003
|
||||
+++ fcgi_pm.c Mon Feb 14 06:57:49 2005
|
||||
@@ -26,7 +26,7 @@ time_t fcgi_dynamic_epoch = 0;
|
||||
* invoked by process mgr */
|
||||
time_t fcgi_dynamic_last_analyzed = 0; /* last time calculation was
|
||||
* made for the dynamic procs */
|
||||
-
|
||||
+int fcgi_is_chrooted = 0; /* If we run in a chrooted httpd */
|
||||
static time_t now = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -1092,6 +1092,8 @@ static void dynamic_read_msgs(int read_r
|
||||
/* Create socket file's path */
|
||||
s->socket_path = fcgi_util_socket_hash_filename(tp, execName, user, group);
|
||||
s->socket_path = fcgi_util_socket_make_path_absolute(sp, s->socket_path, 1);
|
||||
+ if (fcgi_is_chrooted)
|
||||
+ ap_server_strip_chroot((char *) s->socket_path, 1);
|
||||
|
||||
/* Create sockaddr, prealloc it so it won't get created in tp */
|
||||
s->socket_addr = ap_pcalloc(sp, sizeof(struct sockaddr_un));
|
||||
@@ -1649,7 +1651,19 @@ void fcgi_pm_main(void *dummy)
|
||||
fcgi_config_set_env_var(fcgi_config_pool, dynamicEnvp, &i, "SystemRoot");
|
||||
|
||||
#else
|
||||
-
|
||||
+
|
||||
+ if (ap_server_chroot_desired()) {
|
||||
+ if (chroot(ap_server_root) < 0) {
|
||||
+ ap_log_error(FCGI_LOG_NOTICE_NOERRNO, fcgi_apache_main_server,
|
||||
+ "FastCGI: process manager unable to chroot into %s!", ap_server_root);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ ap_log_error(FCGI_LOG_NOTICE_NOERRNO,
|
||||
+ fcgi_apache_main_server, "FastCGI: process manager chrooted in %s", ap_server_root);
|
||||
+ chdir("/");
|
||||
+ fcgi_is_chrooted = 1;
|
||||
+ }
|
||||
+
|
||||
reduce_privileges();
|
||||
change_process_name("fcgi-pm");
|
||||
|
12
www/mod_fastcgi/patches/patch-mod_fastcgi_c
Normal file
12
www/mod_fastcgi/patches/patch-mod_fastcgi_c
Normal file
@ -0,0 +1,12 @@
|
||||
--- mod_fastcgi.c.orig Thu Oct 30 02:08:34 2003
|
||||
+++ mod_fastcgi.c Mon Feb 14 06:54:32 2005
|
||||
@@ -1074,7 +1074,8 @@ static int open_connection_to_fs(fcgi_re
|
||||
{
|
||||
socket_path = fcgi_util_socket_hash_filename(rp, fr->fs_path, fr->user, fr->group);
|
||||
socket_path = fcgi_util_socket_make_path_absolute(rp, socket_path, 1);
|
||||
-
|
||||
+ ap_server_strip_chroot((char *) socket_path, 0);
|
||||
+
|
||||
#ifndef WIN32
|
||||
err = fcgi_util_socket_make_domain_addr(rp, (struct sockaddr_un **)&socket_addr,
|
||||
&socket_addr_len, socket_path);
|
9
www/mod_fastcgi/pkg/DESCR
Normal file
9
www/mod_fastcgi/pkg/DESCR
Normal file
@ -0,0 +1,9 @@
|
||||
mod_fastcgi is a module for the Apache web server, that enables
|
||||
FastCGI - a standards based protocol for communicating with
|
||||
applications that generate dynamic content for web pages.
|
||||
|
||||
FastCGI provides a superset of CGI functionality, but a subset of the
|
||||
functionality of programming for a particular web server API.
|
||||
Nonetheless, the feature set is rich enough for programming virtually
|
||||
any type of web application, but the result is generally more
|
||||
scalable.
|
8
www/mod_fastcgi/pkg/MESSAGE
Normal file
8
www/mod_fastcgi/pkg/MESSAGE
Normal file
@ -0,0 +1,8 @@
|
||||
To finish the install of mod_fastcgi, you need
|
||||
to enable the module using the following command
|
||||
|
||||
${PREFIX}/sbin/mod_fastcgi-enable
|
||||
|
||||
If you already have Apache running on your machine,
|
||||
you should not use "apachectl restart" - instead,
|
||||
you should fully stop and then restart the server.
|
6
www/mod_fastcgi/pkg/PLIST
Normal file
6
www/mod_fastcgi/pkg/PLIST
Normal file
@ -0,0 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/02/14 06:23:23 mbalmer Exp $
|
||||
lib/mod_fastcgi.so
|
||||
sbin/mod_fastcgi-enable
|
||||
share/doc/mod_fastcgi/
|
||||
share/doc/mod_fastcgi/LICENSE.TERMS
|
||||
share/doc/mod_fastcgi/mod_fastcgi.html
|
8
www/mod_fastcgi/pkg/UNMESSAGE
Normal file
8
www/mod_fastcgi/pkg/UNMESSAGE
Normal file
@ -0,0 +1,8 @@
|
||||
To completely deinstall the mod_fastcgi package you
|
||||
need to perform these steps as root:
|
||||
|
||||
edit /var/www/conf/httpd.conf
|
||||
remove the line: LoadModule fastcgi_module
|
||||
|
||||
Do not do this if you plan on re-installing the mod_fastcgi
|
||||
package at some future time.
|
Loading…
Reference in New Issue
Block a user