Skip to content

Commit

Permalink
2009-02-20 Marek Habersack <mhabersack@novell.com>
Browse files Browse the repository at this point in the history
	* mod_mono.h: removed Apache 1.3 support.
	Defined several macros used in mod_mono.c

	* mod_mono.c: removed Apache 1.3 support.
	Replaced atoi calls with own function to convert strings to
	integers with a fall back to a provided default (string_to_long).
	Adjusted levels of several DEBUG_PRINT messages.
	Improved dashboard initialization code.
	Some refactoring to make code more granular.
	Redirecting stdout to /dev/null depends on whether we run with
	debugging on or not and whether we were compiled with
	--enable-debug or not.

	* Makefile.am: removed Apache 1.3 support

2009-02-20  Marek Habersack  <mhabersack@novell.com>

	* configure.in: added --with-debug-level to set the DEBUG_PRINT
	output level.
	Removed Apache 1.3 support.

	* AUTHORS, INSTALL, README: updated

svn path=/trunk/mod_mono/; revision=127498
  • Loading branch information
grendello committed Feb 20, 2009
1 parent 572c6fc commit a755dbd
Show file tree
Hide file tree
Showing 10 changed files with 469 additions and 795 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

Daniel Lopez Ridruejo <daniel @ rawbyte.com>
Gonzalo Paniagua Javuer <gonzalo @ ximian.com>
Joshua Tauberer <jit@occams.info>
Marek Habersack <mhabersack @ novell.com>

8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2009-02-20 Marek Habersack <mhabersack@novell.com>

* configure.in: added --with-debug-level to set the DEBUG_PRINT
output level.
Removed Apache 1.3 support.

* AUTHORS, INSTALL, README: updated

2009-02-16 Marek Habersack <mhabersack@novell.com>

* src/mod_mono.c (fork_mod_mono_server): unblock the signals Mono
Expand Down
36 changes: 17 additions & 19 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Last updated: Jul 25, 2005
Last updated: Jan 28, 2009

Index
-------
Expand All @@ -19,21 +19,21 @@ Installing mod_mono
--------------------

The following are instructions on getting mod_mono working with
Apache, either 1.3 or 2. Once you set it up, Apache will be able to
serve ASP.NET pages.
Apache 2. Once you set it up, Apache will be able to serve ASP.NET
pages.

* Prerrequisites
-----------------
You will need:

* mono (http://www.go-mono.com)
* apache 1.3 or 2 and its development package. Usually called
apache2-dev, apache-dev...
* apache 2.0 or later and its development packages. Usually called
apache2-dev, apache2-devel...
* Latest xsp and mod_mono tarballs (http://go-mono.com/download.html)

* Assumptions
-------------
The next steps assume you have installed mono, xsp and apache in
The next steps assume you have installed mono, XSP and Apache in
/usr. Notice that you will need to be root in order to run 'make
install'.

Expand All @@ -54,9 +54,9 @@ Installing mod_mono

./configure --prefix=/usr --with-apxs=/usr/sbin/apxs

(Apache 2 only) If you get errors while compiling due to apr.h
header not found, you'll need to use the --with-apr-config option
and provide the full path to 'apr-config':
If you get errors while compiling due to apr.h header not found,
you'll need to use the --with-apr-config option and provide the
full path to 'apr-config':

./configure --prefix=/usr --with-apr-config=/usr/bin/apr-config

Expand All @@ -67,13 +67,12 @@ Installing mod_mono

LoadModule mono_module modules/mod_mono.so

2. Configure apache.
2. Configure Apache.

We're going to configure apache so that we can browse the samples
We're going to configure Apache so that we can browse the samples
installed by XSP under /usr/lib/xsp/test.

Edit your httpd.conf file, which should be in /etc/httpd,
/etc/apache, /etc/apache2...
Edit your httpd.conf file, which should be in /etc/httpd, /etc/apache2...

Add the following lines:

Expand All @@ -84,7 +83,7 @@ Installing mod_mono
for everything requested as /demo/xxx under
/usr/lib/xsp/test/xxx.Don't forget the quotes.

For Apache 1.3 and, optionally, for Apache 2.0, add these lines:
Add these lines:

<Directory /usr/lib/xsp/test>
SetHandler mono
Expand All @@ -93,8 +92,7 @@ Installing mod_mono
</IfModule>
</Directory>

If you are using Apache 2.0, you can use get the same results with
this:
Alternatively, you can use get the same results with this:

<Location /demo>
SetHandler mono
Expand Down Expand Up @@ -154,8 +152,6 @@ APPENDIX A: Typical configuration without virtual hosts

Your configuration should be something like:

LoadModule mono_module /usr/lib/apache/1.3/mod_mono.so
AddModule mod_mono.c
Alias /demo "/usr/lib/xsp/test"
AddMonoApplications default "/demo:/usr/lib/xsp/test"
<Directory /usr/lib/xsp/test>
Expand All @@ -176,7 +172,7 @@ APPENDIX A: Typical configuration without virtual hosts
</Location>

If you prefer to .webapp configuration file(s) (see manual page
of xsp), you can change MonoApplications in the above samples by:
of XSP), you can change MonoApplications in the above samples by:

MonoApplicationsConfigFile default "/var/www/applications.webapp"

Expand Down Expand Up @@ -239,3 +235,5 @@ CREDITS
Gonzalo Paniagua Javier <gonzalo @ ximian.com>
Maintainer

Marek Habersack <mhabersack @ novell.com>
Maintainer
5 changes: 3 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_mono
---------
mod_mono is an apache module that provides ASP.NET functionality.
mod_mono is an Apache 2.0+ module that provides ASP.NET functionality.

See INSTALL for installation instructions

Expand All @@ -10,5 +10,6 @@ You can reach the maintainer at:
Questions are usually sent to mono-list
(http://lists.ximian.com/mailman/listinfo/mono-list).

More information at http://www.mono-project.com/
More information at http://mono-project.com/Mod_mono


54 changes: 26 additions & 28 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ if test "x$enable_debug" = "xyes" ; then
CFLAGS="$CFLAGS -DDEBUG"
fi

#
# --with-debug-level
#
AC_MSG_CHECKING([What level debug messages should be printed at])
AC_ARG_WITH(debug-level,
[ --with-debug-level set the debug messages level to the specified value (0-9, 0 is the most verbose)],
debug_level=$withval, debug_level=0)
if test "x$enable_debug" = "xyes" ; then
CFLAGS="$CFLAGS -DDEBUG_LEVEL=$debug_level"
AC_MSG_RESULT($debug_level)
else
AC_MSG_RESULT([debug output disabled])
fi

#
# --with-remove-display
#
Expand Down Expand Up @@ -289,17 +303,9 @@ AC_TRY_COMPILE([
APACHE_VER=1.3
])

# ensure we have apache 1.3
# We no longer support Apache < 2.0
if test "$APACHE_VER" = "1.3" ; then
AC_TRY_COMPILE([
#include <httpd.h>
], [
char *version = SERVER_BASEREVISION;
], [
APACHE_VER=1.3
], [
APACHE_VER=retry
])
AC_MSG_ERROR([Apache 1.3 is no longer supported. mod_mono now requires at least Apache 2.0])
else
AC_TRY_RUN([
#include <ap_release.h>
Expand Down Expand Up @@ -335,8 +341,7 @@ if test "$APACHE_VER" = "retry"; then
fi

if test "$APACHE_VER" = "1.3"; then
CFLAGS="$CFLAGS -DAPACHE13 -DEAPI"
AC_MSG_RESULT($APACHE_VER)
AC_MSG_ERROR([Apache 1.3 is no longer supported. mod_mono now requires at least Apache 2.0])
fi

#
Expand Down Expand Up @@ -371,11 +376,10 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
fi
)

AM_CONDITIONAL(APACHE2, test ! "$APACHE_VER" = "1.3")
if test ! "$APACHE_VER" = "1.3" ; then
AM_CONDITIONAL(APACHE2, true)

dnl Sources are recompiled if we change the target version
AC_DEFINE([APACHE2],,[Compiling for Apache >= 2.0 ])
fi
AC_DEFINE([APACHE2],,[Compiling for Apache >= 2.0 ])

if test "$APACHE_VER" = "2.2" ; then
AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
Expand All @@ -395,17 +399,8 @@ AC_ARG_WITH(mono-default-config-dir,
fi
],)

if test ! "$APACHE_VER" = "1.3" ; then
found_apr_socket_connect=yes
AC_DEFINE([HAVE_APR_SOCKET_CONNECT],,[apr_socket_connect is present])
else
found_apr_socket_connect=no
AC_CHECK_LIB(apr-0, apr_socket_connect, found_apr_socket_connect=yes)
if test "x$found_apr_socket_connect" = "xyes" ; then
AC_DEFINE([HAVE_APR_SOCKET_CONNECT],,[apr_socket_connect is present])
fi

fi
found_apr_socket_connect=yes
AC_DEFINE([HAVE_APR_SOCKET_CONNECT],,[apr_socket_connect is present])

MONO_PREFIX=`$PKG_CONFIG --silence-errors --variable=prefix mono`
if test x$MONO_PREFIX = "x" ; then
Expand Down Expand Up @@ -461,12 +456,15 @@ echo " * Apache version = $APACHE_VER"
echo " * Apache modules directory = $APXS_LIBEXECDIR"
test -x "$APXS" && \
echo " * apxs = $APXS"
test ! "$APACHE_VER" = "1.3" -a -x "$APRCONFIG" && \
test -x "$APRCONFIG" && \
echo " * apr-config = $APRCONFIG"
test "$APUCONFIG" && \
echo " * apu-config = $APUCONFIG"
echo " * CFLAGS = $CFLAGS"
echo " * Verbose logging (debug) = $enable_debug"
if test "x$enable_debug" = "xyes" ; then
echo " * Debug output level = $debug_level"
fi
echo " * GCOV options used = $enable_gcov"
echo " * Profiling enabled = $enable_gprof"
echo " * mono prefix = $MONO_PREFIX"
Expand Down
24 changes: 12 additions & 12 deletions man/mod_mono.8.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\"
.\" mod_mono manual page.
.\" (C) 2004,2007 Novell, Inc.
.\" (C) 2004-2009 Novell, Inc.
.\" Author:
.\" Gonzalo Paniagua Javier (gonzalo@ximian.com)
.\" Marek Habersack (mhabersack@novell.com)
Expand All @@ -10,12 +10,11 @@
.if n .sp
..

.TH mod_mono "8" "26 Jul 2007" "mod_mono @VERSION@" "ASP.NET Support for Apache"
.TH mod_mono "8" "28 Jan 2009" "mod_mono @VERSION@" "ASP.NET Support for Apache"
.SH NAME
mod_mono \- apache module that enables ASP.NET pages. Works together with mod-mono-server.exe
.SH DESCRIPTION
\fImod_mono\fP is a simple module that works with both 1.3 and 2.0
versions of apache.
\fImod_mono\fP is a simple module that works with Apache 2.0 or newer.
.PP
It needs mod-mono-server.exe installed on the system. By default, it
will attemp to run mod-mono-server.exe if it doesn't find it's running.
Expand Down Expand Up @@ -68,7 +67,7 @@ the backend initialize properly before attempting to connect to
it. Value cannot be lower than 2.
Default value: 2
.TP
.I "MonoAutoRestartMode (Apache 2.0+ only)"
.I "MonoAutoRestartMode"
Set the auto-restart mode for the backend(s). Three modes are available:
None - do not auto-restart, Requests - restart after a configured number of
requests served, Time - restart after the backend has been up for the specified
Expand All @@ -78,12 +77,12 @@ off-process state server, since on every restart your application
state will be lost.
Default value: None
.TP
.I "MonoAutoRestartRequests (Apache 2.0+ only)"
.I "MonoAutoRestartRequests"
Number of requests for a backend to serve before auto-restarting. The value here
is taken into account only when MonoAutoRestartMode is set to Requests.
Default value: 10000
.TP
.I "MonoAutoRestartTime (Apache 2.0+ only)"
.I "MonoAutoRestartTime"
Time after which the backend should be auto-restarted. The time format is:
DD[:HH[:MM[:SS]]]. Default value: 00:12:00:00
.TP
Expand Down Expand Up @@ -166,11 +165,13 @@ The maximum number of concurrent requests mod_mono will hold while
the ASP.NET backend is busy with the maximum number of requests
specified by MonoMaxActiveRequests. Requests that can't be processed
or held are dropped with Service Unavailable. Default value: 20.
.SH SAMPLE CONFIGURATION
.SH SAMPLE VIRTUAL HOST CONFIGURATION
Note that the configuration below requires the mod_mono module to be
loaded by Apache. How it is done is distribution-specific - please check
your distribution documentation for details.

This one using <Directory>:
.nf
LoadModule mono_module /usr/lib/apache/1.3/libmod_mono.so
AddModule mod_mono.c
Alias /mono "/usr/lib/xsp/test"
AddMonoApplications default "/mono:/usr/lib/xsp/test"
<Directory /usr/lib/xsp/test>
Expand All @@ -183,7 +184,6 @@ This one using <Directory>:
.PP
This one using <Location>:
.nf
LoadModule mono_module modules/libmod_mono.so
Alias /demo "/usr/lib/xsp/test"
AddMonoApplications default "/demo:/usr/lib/xsp/test"
<Location /demo>
Expand Down Expand Up @@ -271,7 +271,7 @@ com). Currently, Marek Habersack (mhabersack@novell.com) is the maintainer.
.SH MAILING LISTS
See http://mail.ximian.com/mailman/mono-list for details.
.SH WEB SITE
Visit http://www.mono-project.com/ for details.
Visit http://mono-project.com/Mod_mono for details.
.SH SEE ALSO
.BR xsp (1), mod-mono-server (1), mono (1), mcs (1)

17 changes: 17 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2009-02-20 Marek Habersack <mhabersack@novell.com>

* mod_mono.h: removed Apache 1.3 support.
Defined several macros used in mod_mono.c

* mod_mono.c: removed Apache 1.3 support.
Replaced atoi calls with own function to convert strings to
integers with a fall back to a provided default (string_to_long).
Adjusted levels of several DEBUG_PRINT messages.
Improved dashboard initialization code.
Some refactoring to make code more granular.
Redirecting stdout to /dev/null depends on whether we run with
debugging on or not and whether we were compiled with
--enable-debug or not.

* Makefile.am: removed Apache 1.3 support

2009-01-28 Marek Habersack <mhabersack@novell.com>

* mod_mono.h, mod_mono.c, Makefile.am: removed all the traces of
Expand Down
4 changes: 0 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@ mod_mono_la_CFLAGS = -Wall -DDFLT_MONO_CONFIG_DIR=\"$(DFLT_MONO_CONFIG_DIR)\"

install: $(lib_LTLIBRARIES)
$(mkinstalldirs) "$(DESTDIR)$(APXS_LIBEXECDIR)"
if APACHE2
$(APXS) -S LIBEXECDIR="$(DESTDIR)$(APXS_LIBEXECDIR)" -i -n mono mod_mono.la
else
$(APXS) -S LIBEXECDIR="$(DESTDIR)$(APXS_LIBEXECDIR)" -i -n mono .libs/mod_mono.so
endif

Loading

0 comments on commit a755dbd

Please sign in to comment.