-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- API changes conn_rec->remote_{addr,ip}, ap_get_server_version() <http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html>
- Loading branch information
Showing
5 changed files
with
1,106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
include ../make.config | ||
|
||
# Set up a bunch of environment settings | ||
SHELL = /bin/sh | ||
|
||
INCLUDES = -I${APACHEINCLUDE_DIR} -I../Adaptor | ||
|
||
# Common compiler and linker flags | ||
CFLAGS = -O2 ${INCLUDES} ${DEBUG_FLAG} -DSINGLE_THREADED_ADAPTOR -D${OS} -DFORKING_WEBSERVER -DAPACHE ${ENABLE_SSL_SUPPORT} | ||
|
||
APXSFLAGS = -c -S CC=${CC} -Wc,"${CFLAGS}" -Wl,"${LDFLAGS}" | ||
|
||
|
||
ifeq "MACOS" "${OS}" | ||
|
||
# These are the default settings for OSX. | ||
CFLAGS += -Wall ${RC_CFLAGS} | ||
LDARCHS = $(patsubst %, -arch %, ${RC_ARCHS}) | ||
LDFLAGS += ${OPENSSL_LIB_FLAGS} ${LDARCHS} -macosx_version_min 10.5 -lm -module | ||
STRIP_FLAGS = -S | ||
endif | ||
# End MacOS X Specific Settings | ||
|
||
|
||
# Build steps | ||
# Get the list of source files from the ../Adaptor directory and change their extension to .o | ||
COMMON_SRCFILES := $(wildcard ../Adaptor/*.c) | ||
#COMMON_OBJFILES := $(patsubst %.c, %.o, $(wildcard ../Adaptor/*.c)) | ||
COMMON_OBJFILES := $(patsubst ../Adaptor/%.c, %.o, $(wildcard ../Adaptor/*.c)) | ||
# The same list as above but with the .lo extension (libtool object, FWIW) | ||
lo_objects = $(patsubst ../Adaptor/%.c, %.lo, $(wildcard ../Adaptor/*.c)) | ||
|
||
|
||
all: mod_WebObjects.so | ||
|
||
# The objects target compiles all the .c files, except mod_WebObjects.c, which we want | ||
# libtool (through apxs or otherwise) to take care of. | ||
#$(COMMON_OBJFILES) : %.o : ../Adaptor/%.c | ||
# $(CC) $(CFLAGS) -c $< | ||
|
||
mod_WebObjects.so : mod_WebObjects.c ${COMMON_SRCFILES} | ||
${APXS2.2} ${APXSFLAGS} mod_WebObjects.c ${COMMON_SRCFILES} | ||
# ${APXS2.2} -i -A -n WebObjects mod_WebObjects.la #auto-install module into libexec dir | ||
cp .libs/mod_WebObjects.so . #extra copy to put mod_WebObjects.so in traditional location | ||
|
||
|
||
clean: | ||
rm -f mod_WebObjects.lo mod_WebObjects.la mod_WebObjects.slo mod_WebObjects.so mod_WebObjects.o *.o | ||
rm -f ../Adaptors/*.o ../*.slo ../*.lo | ||
rm -rf .libs | ||
|
||
include ../Adaptor/make.postamble | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
3 July, 2006 | ||
|
||
README for Apache2 WebObjects adaptor, hosted by Project WONDER. | ||
|
||
|
||
Yes, it's true! You can run the WebObjects adaptor on Apache2.4.x. | ||
|
||
|
||
HOW TO GET STARTED | ||
1. Get Apache2.4.x. You may use either source, or precompiled binary. | ||
2. Download the WOAdaptor source. | ||
For CVS access information, please visit http://sourceforge.net/projects/wonder/ | ||
CVS will always have the latest patches, so you are encouraged to get the sources via CVS. | ||
|
||
3. Set the build variables appropriate to your system's configuration in the file "make.config" and set the adaptors variable to Apache2.4 (see comments in file.) | ||
|
||
4. Build the adaptor. (make) | ||
|
||
5. Install the adaptor. | ||
|
||
cd Apache2.4 | ||
|
||
$(PATH_TO_APACHE2)/bin/apxs -i -a -n WebObjects 'build product' | ||
|
||
e.g. | ||
|
||
/usr/local/Apache2.4/bin/apxs -i -a -n WebObjects mod_WebObjects.la | ||
|
||
or just 'sudo make install'. | ||
|
||
5. Set the correct entries in your Apache2.4.x httpd.conf configuration file. You'll need at least the following, which should be entered automatically when you use apxs to install the adaptor: | ||
|
||
LoadModule WebObjects_module modules/mod_WebObjects.so | ||
|
||
See the sample configuration file for some appropriate settings. | ||
|
||
Apache 2.4.x is more restrictive in its default permissions. You'll need to specifically allow access to the virtual location used by WebObjects. It may also be necessary to change the name of the WebObjectsAlias setting from /cgi-bin/WebObjects to <foo>/WebObjects or comment out the ScriptAlias definition for the /cgi-bin/ directory. The following directive is url dependent, so you may need another solution if you also use mod_rewrite to mask WebObjects from the url. | ||
|
||
<Location ~ "/Apps/WebObjects"> | ||
Require all granted | ||
</Location> | ||
|
||
6. Copy over the WebObjects directory from your previous installation to the new WebObjectsDocumentRoot $(APACHE2_DIR)/htdocs. If you prefer, a symlink works fine. | ||
|
||
7. If you use Monitor to deploy your applications, make sure to set the correct adaptor path for your applications. | ||
|
||
|
||
IMPORTANT NOTE ON USE WITH SSL | ||
|
||
You cannot use an adaptor module build with -DAPACHE_SECURITY_ENABLED if you don't have your server compiled with SSL support. mod_ssl is now Apache's standard way to do SSL. If you're not using SSL, change the ENABLE_SSL_SUPPORT flag in the Makefile to reflect that fact. | ||
|
||
|
||
KNOWN ISSUES | ||
|
||
None. Please let us know if you find bugs. | ||
|
||
|
||
SUPPORT | ||
|
||
If you have questions, suggestion, or problems, you may e-mail me at [email protected]. Please realize that I may not know the answer to your questions, and that I only have a MacOS X machine, so I likely won't be able to answer questions about other platforms. | ||
|
||
|
||
TODO | ||
|
||
Testing! The adaptor has had minimal testing. | ||
|
||
Improve the Makefile for multiple platform support. | ||
|
||
|
||
THANKS | ||
|
||
Apple Computer, Inc. for the original code. | ||
Hideshi Nakase of Senmeisha Inc., who has graciously worked with me and provided valuable assistance and code. | ||
Jonathan Rentzsch for encouragement and inspiration. | ||
Piotr Intres, for fixing a configuration bug. | ||
Project WONDER, for being a home for all things WebObjects. | ||
Travis Cripps, who did this port to Apache2/2.2. :) | ||
All others who have contributed. | ||
You, for using it. | ||
|
||
|
||
LICENSE | ||
The original code was released under the APSL, and is courtesy of Apple, Computer, Inc. You can see their copyright statements in the code files. That license still applies. Basically, it means you can use the code however you like. | ||
|
||
|
||
LASTLY -- ALMOST | ||
There is no expressed warranty with this software. This is not Apple's code. I have altered their code to work with Apache2.4.x. If you have problems with the software, if your machine melts down into a pool of silicone and plastic when you install this software, please don't come after me. And certainly don't get mad at Apple--they did the Right Thing� by opening the code. | ||
|
||
|
||
HISTORY | ||
|
||
27 Sept, 2006 - Updated to work on both 32 and 64-bit architectures. Most changes are to Adaptor/shmem.c. | ||
|
||
3 July, 2006 - Ported to work with Apache 2.2.x. | ||
|
||
21 June, 2003 - Enhanced makefile; fixed bugs in configuration parameters, ssl, and building with Apache2's apxs; cleaned up code in general. | ||
|
||
3 June, 2001 - Initial version. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# WebObjects 5.4: Enable the WebObjects module. | ||
#LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so | ||
|
||
# Alternatively, You can load the WebObjects Module manually by typing and commenting out the previous | ||
# LoadModule directive. | ||
# /usr/bin/apxs -i -a -n WebObjects mod_WebObjects.la | ||
LoadModule WebObjects_module modules/mod_WebObjects.so | ||
|
||
# Path to the Document Root of your Webserver, | ||
# it should contain a directory named WebObjects | ||
WebObjectsDocumentRoot LOCAL_LIBRARY_DIR/WebServer/Documents | ||
|
||
# You can change the 'cgi-bin' part of WebObjectsAlias to whatever you | ||
# prefer (such as Apps), but the 'WebObjects' part is required. | ||
WebObjectsAlias /cgi-bin/WebObjects | ||
|
||
# Here are the 3 possible configuration modes. | ||
# The apache module uses one of them to get information | ||
# about your deployed applications. | ||
# 1085 is the reserved port on which wotaskd processes listen to by default. | ||
|
||
# Host List Configuration | ||
# wotaskd is started automatically on supported platforms, | ||
# so this is the default mode. | ||
# The apache module gets its configuration from the wotaskds | ||
# listed on the configuration line | ||
# For multiple hosts: | ||
# WebObjectsConfig http://<name-of-a-host>:<port-on-a-host>,http://<name-of-another-host>:<port-on-a-host> <interval> | ||
# For localhost: | ||
WebObjectsConfig http://localhost:1085 10 | ||
|
||
# Multicast Configuration | ||
# The apache module gets its configuration from all wotaskds | ||
# that respond to the multicast call on the subnet | ||
# WebObjectsConfig webobjects://239.128.14.2:1085 10 | ||
|
||
# File Configuration | ||
# The apache module gets its configuration from one file | ||
# WebObjectsConfig file://<path-to-a-xml-config-file> 10 | ||
|
||
|
||
# To enable public access to the WOAdaptorInfo page, uncomment the following line | ||
# WebObjectsAdminUsername public | ||
|
||
# To enable the WOAdaptorInfo page with restricted access, | ||
# uncomment the next two lines and set the user and password | ||
# To access the WOAdaptorInfo page with restricted access, | ||
# use a URL like: http://webserver/cgi-bin/WebObjects/WOAdaptorInfo?user+password. | ||
# WebObjectsAdminUsername user | ||
# WebObjectsAdminPassword password | ||
|
||
# To change the logging options, read the following comments: | ||
# The option name is "WebObjectsLog" and the first value indicates the path of the log file. | ||
# The second value indicates the log level. There are five, in decreasing informational order: | ||
# "Debug", "Info", "Warn", "Error", "User" | ||
# | ||
# Note: To enable logging, touch '/tmp/logWebObjects' as the administrator user (usually root). | ||
# After apache starts, you'll have to change the owner permissions to 'www'. | ||
# Type: sudo chown www /Library/WebObjects/Logs/WebObjects.log | ||
# See <rdar://problem/5296267> /tmp/logWebObjects insecure tempfile in WebObjects | ||
# | ||
# The following line is the default: | ||
# WebObjectsLog /tmp/WebObjects.log Debug |
Oops, something went wrong.
1c8fa3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bastian, have you tried using the Apache 2.4 adaptor with the new "event" MPM, or are you using prefork?
Thanks
--James
1c8fa3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, only tested it with prefork.