[Mono-devel-list] Patching mod_mono to provide ASP.NET support for an entire virtual host on Apache 1.3.28
Christopher McGinnis
christopherm at neopets.com
Thu May 13 02:31:25 EDT 2004
After compiling mod_mono and configuring it to server ASP.NET pages for a
complete virtual host I found that Apache would no longer server any web
pages (including ASP.NET). Serving ASP.NET pages in a virtual/alias'd
directory, however, worked just fine.
My "MonoApplications" line read as follows:
MonoApplications "/:/var/http"
After going through the mod_mono source I found that I could not tell
mod-mono-server.exe what I wanted the "--root" parameter to be.
NOTE: "mod-mono-server.exe --help" lists "MonoServerRootDir" as being a
paramter that can be set in httpd.conf however mod_mono does not support it.
I went ahead and modified the source to allow "MonoServerRootDir" to be set
in httpd.conf. After that I was able to server ASP.NET pages for whole
virtual host (e.g. http://www.somedomain.com/index.aspx).
The diff of my changes and the original source is listed below.
Original mod_mono.c = <
Modified mod_mono.c = >
Christopher McGinnis
Neopets Inc.
111a112
> #define SERVER_ROOT "/var/http";
207a209
> char *server_root;
216a219
> CONFIG_FUNCTION (server_root, server_root)
232a236
> server->server_root= SERVER_ROOT;
625c629
< char *argv [8];
---
> char *argv [10];
689c693,695
< argv [7] = NULL;
---
> argv [7] = "--root";
> argv [8] = server_conf->server_root;
> argv [9] = NULL;
693,694c699,700
< "running '%s %s %s %s %s %s %s'",
< argv [0], argv [1], argv [2], argv [3], argv [4], argv [5], argv
[6]);
---
> "running '%s %s %s %s %s %s %s %s %s'",
> argv [0], argv [1], argv [2], argv [3], argv [4], argv [5], argv [6],
argv[7], argv[8]);
964a971,977
> {"MonoServerRootDir",
> CONFIG_FUNCTION_NAME (server_root),
> NULL,
> RSRC_CONF,
> TAKE1,
> "See MONO_SHARED_DIR in the mono manual page. Default: \"/tmp\""
> },
1039a1053,1058
> AP_INIT_TAKE1 ("MonoServerRootDir",
> CONFIG_FUNCTION_NAME (server_root),
> NULL,
> RSRC_CONF,
> "See MONO_SHARED_DIR in the mono manual page. Default: \"/tmp\""
More information about the Mono-devel-list
mailing list