Skip to content

Commit

Permalink
2004-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* man/mod_mono.8.in:
	* INSTALL: added .webapp sample. MonoApplications is not mandatory.

	* src/mod_mono.c: only one of MonoApplications,
	MonoApplicationsConfigFile and MonoApplicationsConfigDir is allowed.
	MonoApplications is no longer mandatory.

svn path=/trunk/mod_mono/; revision=28772
  • Loading branch information
gonzalop committed Jun 3, 2004
1 parent ecd49e0 commit 5201974
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 19 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
2004-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* man/mod_mono.8.in:
* INSTALL: added .webapp sample. MonoApplications is not mandatory.

* src/mod_mono.c: only one of MonoApplications,
MonoApplicationsConfigFile and MonoApplicationsConfigDir is allowed.
MonoApplications is no longer mandatory.

2004-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* configure.in: check for setenv and putenv.
* src/mod_mono.c: use putenv when setenv is not available. Fixes build
problem under Solaris 8.

2004-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* Released 0.10

2004-05-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* INSTALL:
Expand Down
14 changes: 8 additions & 6 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Last updated: May 29, 2004
Last updated: Jun 3, 2004

Index
-------
Expand Down Expand Up @@ -194,11 +194,6 @@ APPENDIX B: Configuration directives for mod_mono
The full path to mod-mono-server.exe.
Default value: "/usr/bin/mod-mono-server.exe"

MonoApplications (used only when MonoRunXSP is True)

This value will be passed to mod-mono-server.exe in the
--applications option. It is mandatory if MonoRunXSP is True.

MonoWapiDir

The directory where mono runtime will create the ".wapi" directory
Expand All @@ -211,6 +206,11 @@ APPENDIX B: Configuration directives for mod_mono
tells mod-mono-server to change the directory to the value specified
before doing anything else.

MonoApplications (used only when MonoRunXSP is True)

This value will be passed to mod-mono-server.exe in the
--applications option. See xsp(1) manual page for details.

MonoApplicationsConfigFile

Adds application definitions from the XML configuration file.
Expand All @@ -223,6 +223,8 @@ APPENDIX B: Configuration directives for mod_mono
specified directory DIR. Files must have '.webapp' extension.
Default value: ""

Note that only one of MonoApplications, MonoApplicationsConfigFile and
MonoApplicationsConfigDir is allowed.


APPENDIX C: Webapp file format
Expand Down
37 changes: 30 additions & 7 deletions man/mod_mono.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.if n .sp
..

.TH mod_mono "8" "19 May 2004" "mod_mono @VERSION@" "ASP.NET Support for Apache"
.TH mod_mono "8" "3 Jun 2004" "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
Expand Down Expand Up @@ -45,12 +45,6 @@ Default value: ""
The full path to mod-mono-server.exe.
Default value: "/usr/bin/mod-mono-server.exe"
.TP
.I "MonoApplications (used only when MonoRunXSP is True)"
This value will be passed to mod-mono-server.exe in the
--applications option. It is
.B mandatory
if MonoRunXSP is True.
.TP
.I "MonoWapiDir"
The directory where mono runtime will create the ".wapi" directory
used to emulate windows I/O. It's used to set MONO_SHARED_DIR.
Expand All @@ -59,13 +53,22 @@ Default value: "/tmp"
.I "MonoDocumentRootDir (used only when MonoRunXSP is True)"
The directory passed in --root argument when launching mod-mono-server.
.TP
.I "MonoApplications (used only when MonoRunXSP is True)"
This value will be passed to mod-mono-server.exe in the
--applications option. See xsp(1) manual page for details.
.TP
.I "MonoApplicationsConfigFile (used only when MonoRunXSP is True)"
The argument passed in --appconfigfile argument to mod-mono-server.
Default value: NULL.
.TP
.I "MonoApplicationsConfigDir (used only when MonoRunXSP is True)"
The argument passed in --appconfigdir argument to mod-mono-server.
Default value: NULL.
.PP
Note that only
.B one
of MonoApplications, MonoApplicationsConfigFile or
MonoApplicationsConfigDir can be specified.
.SH SAMPLE CONFIGURATION
For Apache 1.3, with mod-mono-server.exe from package xsp installed in
prefix=/usr:
Expand All @@ -81,6 +84,7 @@ prefix=/usr:
</IfModule>
</Directory>
.fi
.PP
For Apache 2.0, with mod-mono-server.exe from package xsp installed in
prefix=/usr:
.nf
Expand All @@ -91,6 +95,25 @@ prefix=/usr:
SetHandler mono
</Directory>
.fi
.PP
If you prefer to .webapp configuration file(s)
(see manual page of xsp), you can change MonoApplications in the above
samples by:
.nf

MonoApplicationsConfigFile "/var/www/applications.webapp"

.fi
replacing the path to the file with yours.
.PP
If you want to use several .webapp files, use this instead:
.nf

MonoApplicationsConfigDir "/var/www/webapp"

.fi
and all the .webapp files found in the directory /var/www/webapp will be
loaded.
.SH ENVIRONMENT VARIABLES
.PP
It may modify MONO_PATH, PATH and MONO_SHARED_DIR when starting
Expand Down
36 changes: 30 additions & 6 deletions src/mod_mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,11 @@ fork_mod_mono_server (apr_pool_t *pool, mono_server_rec *server_conf)
argv [argi++] = server_conf->server_path;
argv [argi++] = "--filename";
argv [argi++] = server_conf->filename;
argv [argi++] = "--applications";
argv [argi++] = server_conf->applications;
if (server_conf->applications != NULL) {
argv [argi++] = "--applications";
argv [argi++] = server_conf->applications;
}

argv [argi++] = "--nonstop";
if (server_conf->document_root != NULL) {
argv [argi++] = "--root";
Expand Down Expand Up @@ -799,16 +802,37 @@ setup_socket (apr_pool_t *pool, mono_server_rec *server_conf)
return -1;
}

/* MonoApplications is mandatory when running mod-mono-server */
/* Either MonoApplications, MonoApplicationsConfigFile or MonoApplicationsConfigDir
* must be specified */
DEBUG_PRINT (1, "Applications: %s", server_conf->applications);
if (server_conf->applications == NULL) {
DEBUG_PRINT (1, "Config file: %s", server_conf->appconfig_file);
DEBUG_PRINT (1, "Config dir.: %s", server_conf->appconfig_dir);
i = 0;
if (server_conf->applications != NULL)
i++;

if (server_conf->appconfig_file != NULL)
i++;

if (server_conf->appconfig_dir != NULL)
i++;

if (i == 0) {
ap_log_error (APLOG_MARK, APLOG_ERR,
STATUS_AND_SERVER,
"Not running mod-mono-server.exe because no "
"MonoApplications specified.");
"Not running mod-mono-server.exe because no MonoApplications, "
"MonoApplicationsConfigFile or MonoApplicationConfigDir specified.");
return -1;
}

if (i != 1) {
ap_log_error (APLOG_MARK, APLOG_ERR,
STATUS_AND_SERVER,
"Not running mod-mono-server.exe because you specified more than one of "
"MonoApplications, MonoApplicationsConfigFile or MonoApplicationConfigDir.");
return -1;
}

fork_mod_mono_server (pool, server_conf);
DEBUG_PRINT (1, "parent waiting");
for (i = 0; i < 3; i++) {
Expand Down

0 comments on commit 5201974

Please sign in to comment.