MAN page from CentOS 6 mono-openpetra-mod_mono-3.0.6-18.9.x86_64.rpm
Section: ASP.NET Support for Apache (8)
Updated: 28 Jan 2009Index
mod_mono - apache module that enables ASP.NET pages. Works together with mod-mono-server.exe
is a simple module that works with Apache 2.0 or newer.
It needs mod-mono-server.exe installed on the system. By default, itwill attemp to run mod-mono-server.exe if it doesn't find it's running.
All the directives but MonoSetServerAlias accept an optional first argument thatis the mod-mono-server instance alias for which the directive applies. If onlyone argument is provided for them, thr directive will apply to the 'default'mod-mono-server instance. Refer to the monodoc documentation on configuringmod_mono for more examples.
- It accepts an octal number as a parameter. The number must be a valid unixfile creation mask value (see umask(2)). The mask will be applied whenevera directory or file is created from within an ASP.NET application.Default value: "0077".
- It accepts a file name as argument. That file will be a named pipeused to send/receive data from/to mod_mono to/from mod-mono-server.You cannot use MonoListenPort and MonoUnixSocket at the same time.Default value: "/tmp/mod_mono_server".
- TCP port on which mod-mono-server should listen/is listening on. Mutuallyexclusive with MonoUnixSocket. When this options is specified,mod-mono-server and mod_mono will use a TCP socket for communication.Default value: none
- MonoListenBacklog N
- The backlog of connections to set on the listener socket in mod-mono-server.By default the value is set to 500.
- MonoMinThreads N
- The minimum number of threads the threadpool allocates in mod-mono-server.Increase this value to better handle the sudden arrival of connections.The default value is determined by the mono runtime.
- IP address where mod-mono-server should listen/is listening on. Can only beused when MonoListenPort is specified.Default value: "127.0.0.1"
- If the value is True, it tells mod_mono to spawn mod-mono-server.exeif it's not already running. If set to False, most of these directives areuseless.Default value: True
- Number of times mod_mono will attempt to start a backend whichdied. Value cannot be lower than 0.Default value: 3
- Number of seconds to wait after starting the backend. This is to letthe backend initialize properly before attempting to connect toit. Value cannot be lower than 2.Default value: 2
- 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 specifiedperiod of time. Note that if you enable auto-restart you should consider usingoff-process state server, since on every restart your applicationstate will be lost.Default value: None
- 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
- Time after which the backend should be auto-restarted. The time format is:DD[:HH[:MM[:SS]]]. Default value: 00:12:00:00
- MonoExecutablePath (Obsoleted, ignored)
- Don't use this. It is ignored and has been left here for compatibility purposes.Default value: "/usr/bin/mono"
- This value will be used to set the MONO_PATH environment variable.Default value: ""
- The full path to the mod-mono-server script.Default value: "/usr/bin/mod-mono-server"
- If MonoRunXSP is True, this option selects the .NET framework version to use. Thisaffects the backend that is started to service the requests. The MonoServerPath optiontakes precedence over this setting. Available values are "2.0", "3.5" and "4.0". Default value: "2.0"
- The directory where mono runtime will create the ".wapi" directoryused to emulate windows I/O. It's used to set MONO_SHARED_DIR.Default value: "/tmp"
- The directory passed in --root argument when launching mod-mono-server.
- If MonoRunXSP is True, CPU time limit in seconds allowed for thespawned mono process. Beyond that, it will be restarted. If thiscapability is not available on your system, the directive will beignored.Default value: system default
- If MonoRunXSP is True, the maximum size of the process's datasegment (data size) in bytes allowed for the spawned mono process.It will be restarted when the limit is reached. If this capabilityis not available on your system, the directive will be ignored.Default value: system default
- This value will be passed to mod-mono-server.exe in the--applications option. See xsp(1) manual page for details.
- The argument passed in --appconfigfile argument to mod-mono-server.Default value: NULL.
- The argument passed in --appconfigdir argument to mod-mono-server.Default value: config/mod-mono-applications
Note that you must specify at least one of MonoApplications,MonoApplicationsConfigFile and MonoApplicationsConfigDir.
- Enables or disables automatic ASP.NET applications discovery. By defaultit is enabled if you have no application configured. Otherwise, it'sdisabled. The possible values are 'enabled' or 'disabled'.
- Runs mono in debug mode, which produces stack traces with line numbers.Default value: False.
- Takes a server alias name. This is to be used inside <Directory> or<Location>.Default value: 'default' if the directive is not used.
- Takes a string of 'name=value' pairs separated by semicolons. For eachpair, it calls setenv (name, value) before running mod-mono-server.
- Takes alias name and a string of the same format and meaning as the MONO_IOMAPenvironment variable (see the mono(1) manpage). The effect is that mod_mono performsthe same actions as mono runtime with MONO_IOMAP in effect, as well as that theMONO_IOMAP variable with the specified value is exported in the backend environment.This option is necessary when you're using MONO_IOMAP in your application and theremight be static files with mixed case names - in such case mod_mono attempts to openthe file directly and sends it using apache facilities.Default value: none
- The maximum number of concurrent requests mod_mono will pass off tothe ASP.NET backend. Set to zero to turn off the limit. Default value:0.
- The maximum number of concurrent requests mod_mono will hold whilethe ASP.NET backend is busy with the maximum number of requestsspecified by MonoMaxActiveRequests. Requests that can't be processedor held are dropped with Service Unavailable. Default value: 150.
- Do not protect hidden files/directories from being accessed by clients. Hidden files/directories are those with Hidden attribute on Windows and whose name starts with a dot on Unix. Any file/directory below a hidden directoryis inacessible. This option turns the default behavior of protecting such locations off. If your applicationdoes not contain any hidden files/directories, you might want to use this option as the checking process has aper-request cost. Accepts a boolean value - 'true' or 'false'Default value: true. AppSettings key name: MonoServerCheckHiddenFiles.
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 checkyour distribution documentation for details.
This one using <Directory>:
Alias /mono "/usr/lib/xsp/test" AddMonoApplications default "/mono:/usr/lib/xsp/test" <Directory /usr/lib/xsp/test> SetHandler mono <IfModule mod_dir.c> DirectoryIndex index.aspx </IfModule> </Directory>
This one using <Location>:
Alias /demo "/usr/lib/xsp/test" AddMonoApplications default "/demo:/usr/lib/xsp/test" <Location /demo> SetHandler mono </Location>
If you prefer to .webapp configuration file(s)(see manual page of xsp), you can change MonoApplications in the abovesamples by:
MonoApplicationsConfigFile default "/var/www/applications.webapp"
replacing the path to the file with yours.
If you want to use several .webapp files, use this instead:
MonoApplicationsConfigDir default "/var/www/webapp"
and all the .webapp files found in the directory /var/www/webapp will beloaded.
Refer to monodoc documentation on configuring mod_mono for more examples.
THE MOD_MONO CONTROL PANEL
mod_mono provides a simple web-based control panel for restarting the mod-mono-server, which is useful when assemblies need to be reloaded from disk after they have been changed. To activate the control panel,place the following in your httpd.conf:
<Location /mono> SetHandler mono-ctrl Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
The control panel is then accessible at http://yourdomain.com/mono. Clicking the link to restart mod-mono-server will immediately restart it.
The Order/Deny/Allow access controls above restrict access to the control panel to the computer with IP address 127.0.0.1. Replace this (or add more Allow lines) with the IP address of your own computer so that you can access the control panel. You can also use Apache's htaccess features to password protect it, too.
It may modify MONO_PATH, PATH and MONO_SHARED_DIR when startingmod-mono-server.
The MOD_MONO_CCV variable may be used to select which component willdo client certificate validity (CCV) checks. By default both Apache andMono will verify the client certificates. This can be changed to either"apache" or "mono" to limit the validity check to either environment.This variable can be set using MonoSetEnv to allow different vhost to use separate validation techniques.
The MOD_MONO_LOCKING_MECHANISM variable may be used to choose the APRlocking mechanism for the dashboard. The currently defined mechanismnames are: DEFAULT, FCNT, FLOCK, SYSVSEM, PROC_PTHREAD, POSIXSEM. Notethat not every mechanism may be available for your platform. In suchcase, mod_mono will fallback to using the DEFAULT value which lets theAPR decide which locking mechanism to use. DEFAULT is also the defaultvalue for the option if the environment variable is not set or itsvalue is unknown. This value MUST NOT be set using MonoSetEnv - itMUST be present in the Apache environment before the module isinitialized and its configuration parsed.
mod_mono was started by Daniel Ridruejo (daniel rawbytecom). Currently, Marek Habersack (mhabersackAATTnovell.com) is the maintainer.
- CONFIGURATION DIRECTIVES
- SAMPLE VIRTUAL HOST CONFIGURATION
- THE MOD_MONO CONTROL PANEL
- ENVIRONMENT VARIABLES
- MAILING LISTS
- WEB SITE
- SEE ALSO
This document was created byman2html,using the manual pages.