You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Mark J Cox <ma...@awe.com> on 1997/11/20 09:56:14 UTC

"Apache moves to Rhapsody" says Zdnet

http://www.zdnet.com/macweek/mw_1145/in_apache.html

"Apple has ported the Apache Web server to Rhapsody, and Tenon
Intersystems will also bring the Web server to the new operating system."

Hmmm. they also seem to think we only have a 34% market share.

Mark


Re: "Apache moves to Rhapsody" says Zdnet

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Thu, 20 Nov 1997, Mark J Cox wrote:

> http://www.zdnet.com/macweek/mw_1145/in_apache.html
> 
> "Apple has ported the Apache Web server to Rhapsody, and Tenon
> Intersystems will also bring the Web server to the new operating system."

Hmm. I took a look at the URL listed in this article,
ftp://ftp.apple.com/devworld/Rhapsody/unsupported_tools/. I don't have
Rhapsody, but I downloaded the source file and examined it.

First, they call it apache_1.2.4-605-source.tgz, but as near as I can
tell, it's actually based on Apache 1.2.1.

They've included a bunch of configuration and document stuff that seems
nice and NextStep-like. They've made a number of changes to our
configuration scripts, presumably to make them work with Rhapsody's
make, etc... There are also a few minor changes to the code, but not many.

I've included the full diff between the 1.2.1 and their source below
(src directory only). I don't know what it means, exactly. But it might be
useful to find out. It'd be nice if Apache ran on Rhapsody out of the box.
Does anyone have a copy that they could try Apache on? (Rhapsody DR1
doesn't support my Mac, and I'm not an Apple developer besides).

diff -u /home/akosut/apache_1.2.1/src/Configuration ./Configuration
--- /home/akosut/apache_1.2.1/src/Configuration	Sat Jul  5 19:20:07 1997
+++ ./Configuration	Wed Oct 15 08:36:05 1997
@@ -162,12 +162,12 @@
 ## STATUS=yes (see the Rules section near the start of this file) to allow
 ## full status information.  Check conf/access.conf on how to enable this.
 
-# Module status_module       mod_status.o
+Module status_module       mod_status.o
 
 ## The Info module displays configuration information for the server and 
 ## all included modules. It's very useful for debugging.
 
-# Module info_module         mod_info.o
+Module info_module         mod_info.o
 
 ## mod_include translates server-side include (SSI) statements in text files.
 ## mod_dir handles requests on directories and directory indexes.
@@ -200,7 +200,7 @@
 ## NOTE: You do not want this module UNLESS you are running a proxy;
 ##       it is not needed for normal (origin server) operation.
 
-# Module proxy_module        modules/proxy/libproxy.a
+Module proxy_module        modules/proxy/libproxy.a
 
 ## The Alias module provides simple URL translation and redirection.
 
@@ -209,7 +209,7 @@
 ## mod_rewrite allows for powerful URI-to-URI and URI-to-filename mapping,
 ## using regular expressions.
 
-# Module rewrite_module      mod_rewrite.o
+Module rewrite_module      mod_rewrite.o
 
 ##
 ## Access control and authentication modules. 
@@ -244,7 +244,7 @@
 ## "digest" implements HTTP Digest Authentication rather than the less 
 ## secure Basic Auth used by the other modules.
 
-# Module digest_module       mod_digest.o
+Module digest_module       mod_digest.o
 
 ## Optional response header manipulation modules. 
 ##
@@ -256,12 +256,12 @@
 ## The expires module can apply Expires: headers to resources,
 ## as a function of access time or modification time.
 
-# Module expires_module      mod_expires.o
+Module expires_module      mod_expires.o
 
 ## The headers module can set arbitrary HTTP response headers,
 ## as configured in server, vhost, access.conf or .htaccess configs
 
-# Module headers_module      mod_headers.o
+Module headers_module      mod_headers.o
 
 ## Miscellaneous modules
 ##
diff -u /home/akosut/apache_1.2.1/src/Configure ./Configure
--- /home/akosut/apache_1.2.1/src/Configure	Wed Jul  2 22:59:43 1997
+++ ./Configure	Wed Oct 15 10:50:14 1997
@@ -10,13 +10,22 @@
 # modules and "rules". These rules are used to allow Configure to
 # be totally configured from Configuration
 #
-# Uses 3 supplemental scripts located in ./helpers: CutRule,
+# Uses 3 supplemental scripts located in ${SRCDIR}/helpers: CutRule,
 # GuessOS and PrintPath
 #
 
-file=Configuration
+#
+# Figure out srcdir for vpath
+# Use the path to this script
+#
+SRCDIR=`echo $0 | sed 's%/[^/][^/]*$%%'`
+if [ "x${SRCDIR}" = "x$0" ]; then SRCDIR=.; fi
+SRCDIR=`cd $SRCDIR ; pwd`
+echo "Sources are in: $SRCDIR"
+
+file=${SRCDIR}/Configuration
 tmpfile=htconf.$$
-makefile_tmpl=Makefile.tmpl
+makefile_tmpl=${SRCDIR}/Makefile.tmpl
 
 while [ "x$1" != "x" ]; do
   if [ "x$1" = "x-file" ] ; then
@@ -47,12 +56,18 @@
 # First, strip comments and blank lines and then change Rules to comments
 # and then remove whitespace before Module declarations
 
-sed 's/#.*//' $file | \
- sed '/^[ 	]*$/d' | \
- sed 's/[ 	]*$//' | \
- sed 's/^Rule[ 	]*/##Rule:/' | \
- sed 's/^[ 	]*Module/Module/' | \
- sed 's/^[        ]*%Module/%Module/' > $tmpfile
+# There is a bug is Rhapsody (at least up to Grail 1Z) which causes the
+# filesystem to crap out if you do the following as a single pipeline.
+# For the time being, let's break it up.
+
+sed 's/#.*//'                        $file      > $tmpfile.1
+sed '/^[ 	]*$/d'               $tmpfile.1 > $tmpfile.2
+sed 's/[ 	]*$//'               $tmpfile.2 > $tmpfile.1
+sed 's/^Rule[ 	]*/##Rule:/'         $tmpfile.1 > $tmpfile.2
+sed 's/^[ 	]*Module/Module/'    $tmpfile.2 > $tmpfile.1
+sed 's/^[        ]*%Module/%Module/' $tmpfile.1 > $tmpfile
+
+rm -f $tmpfile.1 $tmpfile.2
 
 # Check for syntax errors...
 
@@ -134,10 +149,10 @@
 #
 # Extract the rules.
 #
-RULE_WANTHSREGEX=`./helpers/CutRule WANTHSREGEX $file`
-RULE_STATUS=`./helpers/CutRule STATUS $file`
-RULE_SOCKS4=`./helpers/CutRule SOCKS4 $file`
-RULE_IRIXNIS=`./helpers/CutRule IRIXNIS $file`
+RULE_WANTHSREGEX=`${SRCDIR}/helpers/CutRule WANTHSREGEX $file`
+RULE_STATUS=`${SRCDIR}/helpers/CutRule STATUS $file`
+RULE_SOCKS4=`${SRCDIR}/helpers/CutRule SOCKS4 $file`
+RULE_IRIXNIS=`${SRCDIR}/helpers/CutRule IRIXNIS $file`
 
 #
 # Now we determine the OS/Platform automagically, thanks to
@@ -154,7 +169,7 @@
 # add the required lines below.
 #
 
-PLAT=`./helpers/GuessOS`
+PLAT=`${SRCDIR}/helpers/GuessOS`
 
 # Preset DBM_LIB. Can be overridden on a per-platform basis.
 
@@ -163,7 +178,7 @@
 #
 # Look for ranlib. Do it early in case we want to override it below
 #
-if ./helpers/PrintPath -s ranlib; then
+if ${SRCDIR}/helpers/PrintPath -s ranlib; then
     RANLIB="ranlib"
 else
     RANLIB="true"
@@ -177,7 +192,7 @@
 for compilers in "gcc" "cc" "acc" "c89"
 do
     lookedfor="$lookedfor $compilers"
-    if ./helpers/PrintPath -s $compilers; then
+    if ${SRCDIR}/helpers/PrintPath -s $compilers; then
 	COMPILER="$compilers"
     	break
     fi
@@ -340,6 +355,11 @@
 	RANLIB="sleep 5; /bin/ranlib"
 	# ranlib on most NeXTs sets the time wrong. 5 secs wait does much good
 	;;
+    *-apple-rhapsody*)
+	OS='Rhapsody'
+	CFLAGS="$CFLAGS -DRHAPSODY"
+	DEF_WANTHSREGEX=yes
+	;;
     *-dec-osf*)
 	OS='DEC OSF/1'
 	CFLAGS="$CFLAGS -DOSF1"
@@ -585,7 +605,7 @@
 #
 if [ "$RULE_WANTHSREGEX" = "yes" ]; then
     REGLIB="regex/libregex.a"
-    INCLUDES="$INCLUDES -Iregex"
+    INCLUDES="$INCLUDES -I./regex -I\$(SRCDIR)/regex"
 fi
 
 #
@@ -617,6 +637,7 @@
 if [ "x$OPTIM" != "x" ]; then
     echo "OPTIM=$OPTIM" >> Makefile.config
 fi
+echo "SRCDIR=$SRCDIR">> Makefile.config
 echo "CFLAGS1=$CFLAGS">> Makefile.config
 echo "INCLUDES1=$INCLUDES">> Makefile.config
 echo "LIBS1=$LIBS">> Makefile.config
@@ -634,8 +655,10 @@
 sed -e "s#@@Configuration@@#$file#" "$makefile_tmpl" >>Makefile
 awk >>Makefile <$tmpfile \
    '($1 == "Module" && $3 ~ /modules\//) { printf "%s: modules/last-built ; @cat /dev/null\n\n", $3, $3}'
-cat Makefile.config ../support/Makefile.tmpl > ../support/Makefile
+if [ ! -d ../support ]; then mkdir ../support; fi
+cat Makefile.config ${SRCDIR}/../support/Makefile.tmpl > ../support/Makefile
 
+if [ ! -d modules ]; then mkdir modules; fi
 cat << EOF > modules/Makefile
 # 
 # Simple Makefile for modules in src/modules.
@@ -644,6 +667,8 @@
 # 
 
 SHELL=$SHELL
+SRCDIR=.
+VPATH=\$(SRCDIR)
 EOF
 
 if [ "$RULE_WANTHSREGEX" = "yes" ]; then
@@ -672,7 +697,10 @@
 	@echo "Done cleaning module subdirectories"
 
 placeholder \$(MODULES): ForceMe
-	(cd \$@; \$(MAKE) CC=\$(CC) AUX_CFLAGS='\$(MOD_CFLAGS)' RANLIB='\$(RANLIB)')
+	dir=\$(SRCDIR)/\`basename \$@\` ; \\
+	bdir=\`basename \$\$dir\` ; \\
+	if [ ! -d \$\$bdir  ]; then mkdir \$\$bdir; fi; \\
+	(cd \$\$bdir; \$(MAKE) CC=\$(CC) AUX_CFLAGS='\$(MOD_CFLAGS)' RANLIB='\$(RANLIB)' SRCDIR="\$\$dir" -f \$\${dir}/Makefile)
 
 ForceMe:
 
@@ -681,4 +709,3 @@
 awk >>modules/Makefile <$tmpfile \
    '($1 == "Module" && $3 ~ /modules\//) { split ($3, pp, "/"); \
    printf "%s_clean:\n\t(cd %s; $(MAKE) clean)\n\n", pp[2], pp[2]}'
-
diff -u /home/akosut/apache_1.2.1/src/Makefile.tmpl ./Makefile.tmpl
--- /home/akosut/apache_1.2.1/src/Makefile.tmpl	Mon Jun 30 18:33:31 1997
+++ ./Makefile.tmpl	Wed Oct 15 10:31:17 1997
@@ -3,10 +3,12 @@
 # This is combined with the information in the "Configuration" file
 # by the configure script to make the actual Makefile.
 
-CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
+VPATH=$(SRCDIR)
+CFLAGS=$(OPTIM) $(EXTRA_CFLAGS)
+CPPFLAGS=$(CFLAGS1) $(INCLUDES)
 LIBS=$(EXTRA_LIBS) $(LIBS1)
-INCLUDES=$(INCLUDES1) $(EXTRA_INCLUDES)
-LFLAGS=$(LFLAGS1) $(EXTRA_LFLAGS)
+INCLUDES=-I$(SRCDIR) $(INCLUDES1) $(EXTRA_INCLUDES)
+LDFLAGS=$(LFLAGS1) $(EXTRA_LFLAGS)
 
 OBJS= alloc.o http_main.o http_core.o http_config.o http_request.o \
   http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o\
@@ -14,7 +16,7 @@
   $(MODULES)
 
 .c.o:
-	$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $<
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(SPACER) $<
 
 all: @@Configuration@@ httpd
 
@@ -26,14 +28,15 @@
 	@false
 
 httpd: $(REGLIB) $(OBJS)
-	$(CC) $(LFLAGS)  -o httpd $(OBJS) $(REGLIB) $(LIBS)
+	$(CC) $(LDFLAGS)  -o httpd $(OBJS) $(REGLIB) $(LIBS)
 
 regex/libregex.a:
-	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
+	if [ ! -d regex ]; then mkdir regex; fi
+	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CPPFLAGS)' RANLIB='$(RANLIB)' SRCDIR='$(SRCDIR)/regex' -f $(SRCDIR)/regex/Makefile)
 
 modules/last-built:
 	(cd modules; \
-	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
+	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CPPFLAGS)' RANLIB='$(RANLIB)' SRCDIR='$(SRCDIR)/modules')
 
 clean:
 	rm -f httpd *.o core
@@ -49,14 +52,14 @@
 
 # Work around broken compilers
 http_bprintf.o: http_bprintf.c
-	$(CC) -c $(INCLUDES) $(CFLAGS) $(BROKEN_BPRINTF_FLAGS) http_bprintf.c
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(BROKEN_BPRINTF_FLAGS) http_bprintf.c
 
 # We really don't expect end users to use this rule.  It works only with
 # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
 # using it.
 depend:
 	sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
-	    && $(CC) -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
+	    && $(CC) -MM $(CPPFLAGS) $(CFLAGS) *.c >> Makefile.new \
 	    && mv Makefile.tmpl Makefile.tmpl.bak \
 	    && mv Makefile.new Makefile.tmpl
 
Only in .: PB.project
diff -u /home/akosut/apache_1.2.1/src/conf.h ./conf.h
--- /home/akosut/apache_1.2.1/src/conf.h	Mon Jun 30 18:38:13 1997
+++ ./conf.h	Tue Oct 21 15:04:00 1997
@@ -256,6 +256,33 @@
 #define USE_LONGJMP
 #define NO_USE_SIGACTION
 
+#elif defined(RHAPSODY)
+#define HAVE_GMTOFF
+/* #define HAVE_MMAP */ /* Not implemented in Rhapsody Developer Release */
+#define HAVE_RESOURCE
+#define HAVE_SYS_RESOURCE_H
+#define HAVE_SYS_SELECT_H
+#define HAVE_SNPRINTF
+#define JMP_BUF jmp_buf
+#define USE_LONGJMP
+#define NO_USE_SIGACTION
+#define HTTPD_ROOT           "/NextLibrary/WebServer"
+#define DOCUMENT_LOCATION    "/NextLibrary/WebServer/Documents"
+#define DEFAULT_USER         "nobody"
+#define DEFAULT_GROUP        "nogroup"
+#define DEFAULT_XFERLOG      "Logs/Access"
+#define DEFAULT_ERRORLOG     "Logs/Errors"
+#define DEFAULT_PIDLOG       "Logs/Process"
+#define DEFAULT_SCOREBOARD   "Logs/Status"
+#define DEFAULT_LOCKFILE     "Logs/Lock"
+#define SERVER_CONFIG_FILE   "Configuration/Server"
+#define RESOURCE_CONFIG_FILE "Configuration/Resources"
+#define TYPES_CONFIG_FILE    "Configuration/MIME"
+#define ACCESS_CONFIG_FILE   "Configuration/Access"
+#define DEFAULT_USER_DIR     "Library/Web Documents"
+#define DEFAULT_PATH         "/bin:/usr/bin:/usr/local/bin"
+#define SUEXEC_BIN           "/usr/libexec/suexec"
+
 #elif defined(LINUX)
 #if LINUX > 1
 #define HAVE_SHMGET
Common subdirectories: /home/akosut/apache_1.2.1/src/helpers and ./helpers
diff -u /home/akosut/apache_1.2.1/src/httpd.h ./httpd.h
--- /home/akosut/apache_1.2.1/src/httpd.h	Sat Jul  5 19:04:22 1997
+++ ./httpd.h	Tue Oct 21 15:04:03 1997
@@ -75,12 +75,14 @@
 #endif
 
 /* Root of server */
+#ifndef DOCUMENT_LOCATION
 #ifdef __EMX__
 /* Set default for OS/2 file system */ 
 #define DOCUMENT_LOCATION "/os2httpd/docs"
 #else
 #define DOCUMENT_LOCATION "/usr/local/etc/httpd/htdocs"
 #endif
+#endif
 
 /* Max. number of dynamically loaded modules */
 #define DYNAMIC_MODULE_LIMIT 64
@@ -112,21 +114,31 @@
 #endif
 
 /* The name of the log files */
+#ifndef DEFAULT_XFERLOG
 #ifdef __EMX__
 /* Set default for OS/2 file system */ 
 #define DEFAULT_XFERLOG "logs/access.log"
 #else
 #define DEFAULT_XFERLOG "logs/access_log"
 #endif
+#endif
+#ifndef DEFAULT_ERRORLOG
 #ifdef __EMX__
 /* Set default for OS/2 file system */ 
 #define DEFAULT_ERRORLOG "logs/error.log"
 #else
 #define DEFAULT_ERRORLOG "logs/error_log"
 #endif
+#endif
+#ifndef DEFAULT_PIDLOG
 #define DEFAULT_PIDLOG "logs/httpd.pid"
+#endif
+#ifndef DEFAULT_SCOREBOARD
 #define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
+#endif
+#ifndef DEFAULT_LOCKFILE
 #define DEFAULT_LOCKFILE "logs/accept.lock"
+#endif
 
 /* Define this to be what your HTML directory content files are called */
 #define DEFAULT_INDEX "index.html"
@@ -152,18 +164,26 @@
 #endif
 
 /* The name of the document config file */
+#ifndef RESOURCE_CONFIG_FILE
 #define RESOURCE_CONFIG_FILE "conf/srm.conf"
+#endif
 
 /* The name of the MIME types file */
+#ifndef TYPES_CONFIG_FILE
 #define TYPES_CONFIG_FILE "conf/mime.types"
+#endif
 
 /* The name of the access file */
+#ifndef ACCESS_CONFIG_FILE
 #define ACCESS_CONFIG_FILE "conf/access.conf"
+#endif
 
 /* Whether we should enable rfc1413 identity checking */
 #define DEFAULT_RFC1413 0
 /* The default directory in user's home dir */
+#ifndef DEFAULT_USER_DIR
 #define DEFAULT_USER_DIR "public_html"
+#endif
 
 /* The default path for CGI scripts if none is currently set */
 #ifndef DEFAULT_PATH
Common subdirectories: /home/akosut/apache_1.2.1/src/modules and ./modules
Common subdirectories: /home/akosut/apache_1.2.1/src/regex and ./regex


-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *