|
Packit |
d68d13 |
Unix Build Instructions
|
|
Packit |
d68d13 |
-----------------------
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
To build and install as a DSO outside of the httpd source
|
|
Packit |
d68d13 |
build, from the fcgid source root directory, simply;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
./configure.apxs
|
|
Packit |
d68d13 |
make
|
|
Packit |
d68d13 |
make install
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
If apxs is not in your path, or you are building to a different
|
|
Packit |
d68d13 |
httpd installation, or your distribution has an alternate script
|
|
Packit |
d68d13 |
name for apxs (e.g. apxs2), then either set the APXS environment
|
|
Packit |
d68d13 |
variable, or use the syntax;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
APXS=/path/to/bin/apxs ./configure.apxs
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
so the desired configuration is used.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
To build static, or as a DSO but within the same build as httpd,
|
|
Packit |
d68d13 |
copy the entire fcgid source directory tree on top of your existing
|
|
Packit |
d68d13 |
httpd source tree, and from the httpd source root directory
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
./buildconf (to pick up fcgid)
|
|
Packit |
d68d13 |
./configure --enable-fcgid {your usual options}
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
and proceed as usual.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Win32 Build Instructions
|
|
Packit |
d68d13 |
------------------------
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
1. Win32 build based on Visual Studio
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
The windows packages prior to 2.2.7 (or 2.0.62) left out the file
|
|
Packit |
d68d13 |
include\mod_log_config.h, just copy these from the source tree
|
|
Packit |
d68d13 |
or you can export them from subversion, just change to your
|
|
Packit |
d68d13 |
installed Apache 2.2 (or 2.0) include subdirectory and...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
svn export http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.h
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
(for your 2.0 installation, replace 2.2.x with 2.0.x in the
|
|
Packit |
d68d13 |
command above). You should be ready to compile the project.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
On windows, before building for httpd-2.0, you must adjust the
|
|
Packit |
d68d13 |
two apr 1.x specific lines in modules\fcgid\mod_fcgid.dsp which begin
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
# ADD LINK32 libapr-1.lib libaprutil-1.lib ...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
to start with the apr 0.9 equivilants for httpd-2.0,
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
# ADD LINK32 libapr.lib libaprutil.lib ...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
If using httpd development version 2.3 plus APR 2.0, replace both
|
|
Packit |
d68d13 |
of these entries with the single (combined) entry;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
# ADD LINK32 libapr-2.lib ...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
To build on windows out-of-tree as a DSO, simply
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
set APACHE2_HOME=c:\path\to\Apache2.2
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
and then, for Visual Studio 6.0 (98)...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
msdev /useenv mod_fcgid.dsw
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
or for Visual Studio .NET (2002) and later ...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
devenv /useenv mod_fcgid.dsw
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
The later command is needed on Visual Studio .NET/2002 and later,
|
|
Packit |
d68d13 |
and converts mod_fcgid.dsw to mod_fcgid.sln. So after converting once,
|
|
Packit |
d68d13 |
use the newly converted solution instead...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
devenv /useenv mod_fcgid.sln
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
On windows you can overlay mod_fcgid source files into the httpd source
|
|
Packit |
d68d13 |
file tree, and make the following changes for an in-tree build;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
* Manually add the project mod_fcgid.dsp to the Apache.dsw workspace.
|
|
Packit |
d68d13 |
* Ensure the BuildBin project includes the mod_fcgid project dependency.
|
|
Packit |
d68d13 |
* Add mod_fcgid project dependencies of libhttpd, libapr and libaprutil.
|
|
Packit |
d68d13 |
* Remove /D "FCGID_APXS_BUILD" from the # ADD CPP lines of
|
|
Packit |
d68d13 |
modules\fcgid\mod_fcgid.dsp.
|
|
Packit |
d68d13 |
* Replace /I "$(APACHE2_HOME)/include" with /I "../../modules/loggers"
|
|
Packit |
d68d13 |
for both # ADD CPP lines of modules\fcgid\mod_fcgid.dsp.
|
|
Packit |
d68d13 |
* Remove the libraries libapr[-1].lib libaprutil[-1].lib libhttpd.lib
|
|
Packit |
d68d13 |
and the /libpath:"$(APACHE2_HOME)\lib" flag from the # ADD LINK32
|
|
Packit |
d68d13 |
lines of modules\fcgid\mod_fcgid.dsp.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Note that mod_fcgid.so needs to be added to the module installation
|
|
Packit |
d68d13 |
lines in Makefile.win, or you must manually copy the .so module from
|
|
Packit |
d68d13 |
modules\fcgid\Release after compiling.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
2. Win32 build based on cmake:
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Note: This support is experimental and may not build mod_fcgid in a
|
|
Packit |
d68d13 |
manner compatible with the existing Windows build support. The
|
|
Packit |
d68d13 |
build interfaces may change as feedback is received and bugs are
|
|
Packit |
d68d13 |
resolved. Currently a .conf file is not created.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Install httpd and APR to a common prefix, and point CMAKE_INSTALL_PREFIX
|
|
Packit |
d68d13 |
to that prefix when configuring mod_fcgid.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Example using the "NMake Makefiles" generator from a Visual Studio command
|
|
Packit |
d68d13 |
prompt:
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
cd some-build-directory
|
|
Packit |
d68d13 |
cmake -G "NMake Makefiles" ^
|
|
Packit |
d68d13 |
-DCMAKE_INSTALL_PREFIX=C:\Apache246 ^
|
|
Packit |
d68d13 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
|
|
Packit |
d68d13 |
C:\path\to\fcgid-sources\modules\fcgid
|
|
Packit |
d68d13 |
nmake && nmake install
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
The last argument to cmake in the example is the directory "modules\fcgid"
|
|
Packit |
d68d13 |
within your svn checkout or tarball/zip extract of mod_fcgid.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Add -DINSTALL_PDB=OFF to the cmake invocation to leave mod_fcgid.pdb (if
|
|
Packit |
d68d13 |
generated) in the build directory.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Add the following LoadModule directive to your configuration:
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
LoadModule fcgid_module modules/mod_fcgid.so
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Documentation Build
|
|
Packit |
d68d13 |
-------------------
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
To regenerate the html.en documentation, here again it's as simple
|
|
Packit |
d68d13 |
as copying the content docs/ into an httpd/docs/ tree and regenerating
|
|
Packit |
d68d13 |
httpd's documentation. However, it's also possible you are generating
|
|
Packit |
d68d13 |
a local copy for reference in mod_fcgid's tree, in that case you must
|
|
Packit |
d68d13 |
have a copy of the httpd docs/manual/style. For example;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
cd docs/manual
|
|
Packit |
d68d13 |
svn co http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/docs/manual/style
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
In either case;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
cd docs/manual
|
|
Packit |
d68d13 |
svn co http://svn.apache.org/repos/asf/httpd/docs-build/trunk build
|
|
Packit |
d68d13 |
cd build
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
and finally;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
./build.sh all
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
or on windows...
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
build.bat all
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
To make this simpler on unix, after invoking ./configure.apxs in the
|
|
Packit |
d68d13 |
top level directory, you can simply;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
make generate-docs
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
which will fetch up those style and build directories (for httpd-2.2)
|
|
Packit |
d68d13 |
and generate the docs for you. After using make and make install, you
|
|
Packit |
d68d13 |
can even merge the directives for the installed manual using this target;
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
make manualdir=/path/to/httpd/manual generate-docs
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
The same rules about an installed, locatable JAVA_HOME apply to building
|
|
Packit |
d68d13 |
mod_fcgid docs as apply to building the httpd manual.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
The advantage to building in-tree within httpd is that you gain the complete
|
|
Packit |
d68d13 |
directive cross references applicable to all httpd and mod_fcgid directives,
|
|
Packit |
d68d13 |
before installing the httpd\manual files.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Incompatible configuration changes
|
|
Packit |
d68d13 |
----------------------------------
|
|
Packit |
d68d13 |
Some changes have been made in the ASF release of mod_fcgid which can affect
|
|
Packit |
d68d13 |
existing configurations:
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
i. All directives have been renamed in order to use a common prefix "Fcgid".
|
|
Packit |
d68d13 |
Underscores in directive names have been eliminated in favor of
|
|
Packit |
d68d13 |
CamelCase. The old directive names will still work but are deprecated.
|
|
Packit |
d68d13 |
To fix your configuration you can use the sed script build/fixconf.sed.
|
|
Packit |
d68d13 |
A table with old and new directive names is included in CHANGES-FCGID.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
ii. Some directives which could be placed inside <VirtualHost > but were
|
|
Packit |
d68d13 |
ignored before now result in configuration errors. As before, these
|
|
Packit |
d68d13 |
directives must be set at global scope to have the desired effect.
|
|
Packit |
d68d13 |
The directives are FcgidBusyScanInterval, FcgidBusyTimeout,
|
|
Packit |
d68d13 |
FcgidMaxProcessesPerClass, FcgidDefaultMinProcessCount,
|
|
Packit |
d68d13 |
FcgidErrorScanInterval, FcgidIdleScanInterval, FcgidIdleTimeout,
|
|
Packit |
d68d13 |
FcgidMaxProcesses, FcgidFixPathinfo, FcgidProcessLifetime,
|
|
Packit |
d68d13 |
FcgidProcessTableFile, FcgidIPCDir, FcgidSpawnScore,
|
|
Packit |
d68d13 |
FcgidSpawnScoreUpLimit, FcgidTerminationScore, FcgidTimeScore, and
|
|
Packit |
d68d13 |
FcgidZombieScanInterval.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
iii. Some directives which could be placed inside <VirtualHost > but were
|
|
Packit |
d68d13 |
ignored before are now respected. These include FcgidIdleTimeout,
|
|
Packit |
d68d13 |
FcgidProcessLifeTime, and others. (Consult CHANGES-FCGID for the complete
|
|
Packit |
d68d13 |
list.)
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
iv. Some directives which can optionally be placed inside <VirtualHost >
|
|
Packit |
d68d13 |
were not inherited as expected in older releases. This has been
|
|
Packit |
d68d13 |
corrected, and behavior will change for some configurations. The
|
|
Packit |
d68d13 |
affected directives are FcgidIOTimeout, FcgidConnectTimeout,
|
|
Packit |
d68d13 |
FcgidMaxRequestInMem, FcgidMaxRequestLen, FcgidMaxRequestsPerProcess,
|
|
Packit |
d68d13 |
and FcgidOutputBufferSize.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
v. Some directives which can be placed inside <Directory >, <Location >,
|
|
Packit |
d68d13 |
etc. were not inherited as expected in older releases. This has been
|
|
Packit |
d68d13 |
corrected, and behavior will change for some configurations. The affected
|
|
Packit |
d68d13 |
directives are FcgidAccessChecker, FcgidAccessCheckerAuthoritative,
|
|
Packit |
d68d13 |
FcgidAuthenticator, FcgidAuthenticatorAuthoritative, FcgidAuthorizer,
|
|
Packit |
d68d13 |
FcgidAuthorizerAuthoritative, and FcgidWrapper.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
Acknowledgements
|
|
Packit |
d68d13 |
----------------
|
|
Packit |
d68d13 |
Portions of this software were originally developed by
|
|
Packit |
d68d13 |
Ryan Pan (Pan Qingfeng) <pqf@mailtech.cn>.
|
|
Packit |
d68d13 |
|
|
Packit |
d68d13 |
This software implements portions of the FastCGI specification
|
|
Packit |
d68d13 |
as defined by Open Market, Inc. The specification is available from
|
|
Packit |
d68d13 |
http://www.fastcgi.com/devkit/doc/fcgi-spec.html
|