Problems installing Apache 2.2 and mod_fastcgi

Henry S. Thompson ht@markup.co.uk
Thu Jun 8 18:17:00 GMT 2006


Since this took a modest amount of searching and trial and error, I
thought it might be worth reporting to others the steps that I've
taken to get fastcgi to compile and install, but not, alas, to work
completely, and ask for help at the end.

1) Using Cygwin Setup, install the following packages:

   apache2
   apache2-devel
   apr1
   aprutil1
   libdb4.2
   libdb4.2-devel
   libtool

2) Download and unpack
    http://www.fastcgi.com/dist/mod_fastcgi-SNAP-0404142202.tar.gz

3) Apply the patches at
    http://www.fastcgi.com/archives/fastcgi-developers/2005-December/004060.html
   e.g. by the following steps:

    > wget http://www.fastcgi.com/archives/fastcgi-developers/2005-December/004060.html
    > tail +55 004060.html | head -52 | sed 's/&/\&/g' > ap22.patch
    > patch -p 1 < ap22.patch

4) Copy Makefile.AP2 to Makefile and apply the patch attached at the
   end of this email.

5) Make and install with

    > make
    > make install

7) Edit /etc/apache2/httpd.conf to add

LoadModule fastcgi_module lib/apache2/mod_fastcgi.so

8) Make sure cygserver is running

 See /usr/share/doc/Cygwin/cygserver.README for instructions

9) Launch your server

 > CYGWIN=server /usr/sbin/httpd2

That gets things running OK, but only using the external server option
(e.g.  FastCgiExternalServer /srv/www/cgi-bin/test.fcg -host localhost:6789) 

I can't get any FastCGI apps to operate in either normal (dynamic) or
static (using explicit TCP ports) mode -- I've tried the fast-cgi
examples from http://fastcgi.com/dist/fcgi.tar.gz and the trivial test
include with the Perl FCGI module, as well as an attempt to roll my
own using the thfcgi Python package.  When run dynamically they all
launch the app OK, but then all fail with one version or another of
'connection refused' or 'software caused connection abort' when the
first message is attempted to be sent from the apache2 server to the
app.  When run statically using TCP, they all die with "Address
already in use", because the Apache server still has the relevant port
open.

 Cygwin DLL version info:
        DLL version: 1.5.19
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 150
        Shared data: 4

If anyone can diagnose my problem, either be pointing out a mistake in
the build sequence above, or . . ., I'd be _most_ grateful.

ht

========mk.patch==========
--- Makefile~        2006-06-07 16:57:14.796875000 +0100 
+++ Makefile    2006-06-07 17:25:14.156250000 +0100 
@@ -4,19 +4,20 @@ 
 
 builddir     = .
 
-top_dir      = /usr/local/apache2
+top_dir      = /usr/share/apache2
 
 top_srcdir   = ${top_dir}
 top_builddir = ${top_dir}
 
 include ${top_builddir}/build/special.mk
 
-APXS      = apxs
-APACHECTL = apachectl
+APXS      = apxs2
+APACHECTL = apachectl2
 
 #DEFS=-Dmy_define=my_value
 #INCLUDES=-Imy/include/dir
 #LIBS=-Lmy/lib/dir -lmylib
+AP_LIBS=-lapr-1 -laprutil-1 -lhttpd2core
 
 all: local-shared-build
 
======================
-- 
		    Henry S. Thompson, Markup Systems Ltd.
    4 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- +44 (0) 7866 471 388
	       Fax: (44) 131 650-4587, e-mail: ht@markup.co.uk
			URL: http://www.markup.co.uk/
[mail really from me _always_ has this .sig -- mail without it is forged spam]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list