1
2mod_mono(8)               ASP.NET Support for Apache               mod_mono(8)
3
4
5

NAME

7       mod_mono  -  apache  module  that enables ASP.NET pages. Works together
8       with mod-mono-server.exe
9

DESCRIPTION

11       mod_mono is a simple module that works with Apache 2.0 or newer.
12
13       It needs mod-mono-server.exe installed on the system.  By  default,  it
14       will attemp to run mod-mono-server.exe if it doesn't find it's running.
15

CONFIGURATION DIRECTIVES

17       All  the  directives  but  MonoSetServerAlias  accept an optional first
18       argument that is the  mod-mono-server  instance  alias  for  which  the
19       directive  applies.   If  only  one  argument is provided for them, thr
20       directive will apply to the 'default' mod-mono-server  instance.  Refer
21       to the monodoc documentation on configuring mod_mono for more examples.
22
23
24       MonoUnixUmask
25              It  accepts an octal number as a parameter. The number must be a
26              valid unix file creation mask value  (see  umask(2)).  The  mask
27              will  be  applied  whenever  a directory or file is created from
28              within an ASP.NET application.  Default value: "0077".
29
30       MonoUnixSocket
31              It accepts a file name as argument. That file will  be  a  named
32              pipe  used  to  send/receive  data from/to mod_mono to/from mod-
33              mono-server.  You cannot use MonoListenPort  and  MonoUnixSocket
34              at the same time.  Default value: "/tmp/mod_mono_server".
35
36       MonoListenPort
37              TCP port on which mod-mono-server should listen/is listening on.
38              Mutually exclusive with MonoUnixSocket.  When  this  options  is
39              specified,  mod-mono-server  and  mod_mono will use a TCP socket
40              for communication.  Default value: none
41
42       MonoListenAddress
43              IP address where mod-mono-server should listen/is listening  on.
44              Can  only  be  used  when  MonoListenPort is specified.  Default
45              value: "127.0.0.1"
46
47       MonoRunXSP
48              If the value is True,  it  tells  mod_mono  to  spawn  mod-mono-
49              server.exe if it's not already running. If set to False, most of
50              these directives are useless.  Default value: True
51
52       MonoXSPStartAttempts
53              Number of times mod_mono will attempt to start a  backend  which
54              died. Value cannot be lower than 0.  Default value: 3
55
56       MonoXSPStartWaitTime
57              Number of seconds to wait after starting the backend. This is to
58              let the backend initialize properly before attempting to connect
59              to it. Value cannot be lower than 2.  Default value: 2
60
61       MonoAutoRestartMode
62              Set  the  auto-restart  mode for the backend(s). Three modes are
63              available: None - do not auto-restart, Requests - restart  after
64              a configured number of requests served, Time - restart after the
65              backend has been up for the specified period of time.  Note that
66              if you enable auto-restart you should consider using off-process
67              state server, since on every restart your application state will
68              be lost.  Default value: None
69
70       MonoAutoRestartRequests
71              Number  of  requests for a backend to serve before auto-restart‐
72              ing. The value here is taken  into  account  only  when  MonoAu‐
73              toRestartMode is set to Requests.  Default value: 10000
74
75       MonoAutoRestartTime
76              Time  after which the backend should be auto-restarted. The time
77              format is: DD[:HH[:MM[:SS]]]. Default value: 00:12:00:00
78
79       MonoExecutablePath (Obsoleted, ignored)
80              Don't use this. It is ignored and has been left here for compat‐
81              ibility purposes.  Default value: "/usr/bin/mono"
82
83       MonoPath
84              This  value  will be used to set the MONO_PATH environment vari‐
85              able.  Default value: ""
86
87       MonoServerPath
88              The full path to the  mod-mono-server  script.   Default  value:
89              "/usr/bin/mod-mono-server"
90
91       MonoWapiDir
92              The  directory where mono runtime will create the ".wapi" direc‐
93              tory  used  to  emulate  windows   I/O.   It's   used   to   set
94              MONO_SHARED_DIR.  Default value: "/tmp"
95
96       MonoDocumentRootDir
97              The directory passed in --root argument when launching mod-mono-
98              server.
99
100       MonoMaxCPUTime
101              If MonoRunXSP is True, CPU time limit in seconds allowed for the
102              spawned mono process. Beyond that, it will be restarted. If this
103              capability is not available on your system, the  directive  will
104              be ignored.  Default value: system default
105
106       MonoMaxMemory
107              If  MonoRunXSP  is  True, the maximum size of the process's data
108              segment (data size)  in  bytes  allowed  for  the  spawned  mono
109              process.   It  will  be  restarted when the limit is reached. If
110              this capability is not available on your system,  the  directive
111              will be ignored.  Default value: system default
112
113       MonoApplications
114
115       AddMonoApplications
116              This value will be passed to mod-mono-server.exe in the --appli‐
117              cations option. See xsp(1) manual page for details.
118
119       MonoApplicationsConfigFile
120              The argument passed in  --appconfigfile  argument  to  mod-mono-
121              server.  Default value: NULL.
122
123       MonoApplicationsConfigDir
124              The  argument  passed  in  --appconfigdir  argument to mod-mono-
125              server.  Default value: config/mod-mono-applications
126
127       Note that you must specify at least one of MonoApplications, MonoAppli‐
128       cationsConfigFile and MonoApplicationsConfigDir.
129
130       MonoAutoApplication
131              Enables or disables automatic ASP.NET applications discovery. By
132              default it is enabled if you  have  no  application  configured.
133              Otherwise,  it's  disabled. The possible values are 'enabled' or
134              'disabled'.
135
136       MonoDebug
137              Runs mono in debug mode, which produces stack traces  with  line
138              numbers.  Default value: False.
139
140       MonoSetServerAlias
141              Takes a server alias name. This is to be used inside <Directory>
142              or <Location>.  Default value: 'default' if the directive is not
143              used.
144
145       MonoSetEnv
146              Takes  a  string  of 'name=value' pairs separated by semicolons.
147              For each pair, it calls setenv (name, value) before running mod-
148              mono-server.
149
150       MonoIOMAP
151              Takes  alias name and a string of the same format and meaning as
152              the MONO_IOMAP environment variable (see the  mono(1)  manpage).
153              The  effect  is  that mod_mono performs the same actions as mono
154              runtime  with  MONO_IOMAP  in  effect,  as  well  as  that   the
155              MONO_IOMAP  variable with the specified value is exported in the
156              backend environment.  This option is necessary when you're using
157              MONO_IOMAP  in  your application and there might be static files
158              with mixed case names - in such case mod_mono attempts  to  open
159              the file directly and sends it using apache facilities.  Default
160              value: none
161
162       MonoMaxActiveRequests
163              The maximum number of concurrent requests mod_mono will pass off
164              to  the  ASP.NET  backend.  Set  to  zero to turn off the limit.
165              Default value: 20.
166
167       MonoMaxWaitingRequests
168              The maximum number of concurrent  requests  mod_mono  will  hold
169              while  the  ASP.NET  backend  is busy with the maximum number of
170              requests specified by MonoMaxActiveRequests. Requests that can't
171              be  processed  or  held  are  dropped  with Service Unavailable.
172              Default value: 20.
173
174       MonoCheckHiddenFiles
175              Do not protect hidden files/directories from being  accessed  by
176              clients.   Hidden   files/directories   are  those  with  Hidden
177              attribute on Windows and whose name starts with a dot  on  Unix.
178              Any file/directory below a hidden directory is inacessible. This
179              option turns the default behavior of protecting  such  locations
180              off.   If   your   application   does  not  contain  any  hidden
181              files/directories, you might want to  use  this  option  as  the
182              checking process has a per-request cost. Accepts a boolean value
183              - 'true' or 'false' Default value: true.  AppSettings key  name:
184              MonoServerCheckHiddenFiles.
185

SAMPLE VIRTUAL HOST CONFIGURATION

187       Note  that  the  configuration below requires the mod_mono module to be
188       loaded by Apache. How it is  done  is  distribution-specific  -  please
189       check your distribution documentation for details.
190
191       This one using <Directory>:
192             Alias /mono "/usr/lib/xsp/test"
193             AddMonoApplications default "/mono:/usr/lib/xsp/test"
194             <Directory /usr/lib/xsp/test>
195                     SetHandler mono
196                     <IfModule mod_dir.c>
197                           DirectoryIndex index.aspx
198                     </IfModule>
199             </Directory>
200
201       This one using <Location>:
202             Alias /demo "/usr/lib/xsp/test"
203             AddMonoApplications default "/demo:/usr/lib/xsp/test"
204             <Location /demo>
205                     SetHandler mono
206             </Location>
207
208
209       If  you  prefer  to  .webapp  configuration file(s) (see manual page of
210       xsp), you can change MonoApplications in the above samples by:
211
212             MonoApplicationsConfigFile default "/var/www/applications.webapp"
213
214       replacing the path to the file with yours.
215
216       If you want to use several .webapp files, use this instead:
217
218             MonoApplicationsConfigDir default "/var/www/webapp"
219
220       and all the .webapp files found in the directory  /var/www/webapp  will
221       be loaded.
222
223       Refer  to  monodoc documentation on configuring mod_mono for more exam‐
224       ples.
225

THE MOD_MONO CONTROL PANEL

227       mod_mono provides a simple web-based control panel for  restarting  the
228       mod-mono-server,  which  is  useful when assemblies need to be reloaded
229       from disk after they have been changed.  To activate the control panel,
230       place the following in your httpd.conf:
231
232                   <Location /mono>
233                     SetHandler mono-ctrl
234                     Order deny,allow
235                     Deny from all
236                     Allow from 127.0.0.1
237                   </Location>
238
239       The  control  panel  is  then accessible at http://yourdomain.com/mono.
240       Clicking the link to restart mod-mono-server will  immediately  restart
241       it.
242
243       The  Order/Deny/Allow access controls above restrict access to the con‐
244       trol panel to the computer with IP address 127.0.0.1. Replace this  (or
245       add  more Allow lines) with the IP address of your own computer so that
246       you can access the control panel.  You can also use  Apache's  htaccess
247       features to password protect it, too.
248

ENVIRONMENT VARIABLES

250       It  may  modify  MONO_PATH, PATH and MONO_SHARED_DIR when starting mod-
251       mono-server.
252
253       The MOD_MONO_CCV variable may be used to select which component will do
254       client  certificate  validity  (CCV) checks. By default both Apache and
255       Mono will verify the client certificates. This can be changed to either
256       "apache"  or  "mono" to limit the validity check to either environment.
257       This variable can be set using MonoSetEnv to allow different  vhost  to
258       use separate validation techniques.
259
260       The  MOD_MONO_LOCKING_MECHANISM  variable may be used to choose the APR
261       locking mechanism for the dashboard. The  currently  defined  mechanism
262       names  are: DEFAULT, FCNT, FLOCK, SYSVSEM, PROC_PTHREAD, POSIXSEM. Note
263       that not every mechanism may be available for your  platform.  In  such
264       case,  mod_mono will fallback to using the DEFAULT value which lets the
265       APR decide which locking mechanism to use. DEFAULT is also the  default
266       value  for  the  option  if  the environment variable is not set or its
267       value is unknown. This value MUST NOT be set using MonoSetEnv - it MUST
268       be  present  in the Apache environment before the module is initialized
269       and its configuration parsed.
270

FILES

272       httpd.conf
273

AUTHORS

275       mod_mono was started by Daniel  Ridruejo  (daniel  rawbyte  com).  Cur‐
276       rently, Marek Habersack (mhabersack@novell.com) is the maintainer.
277

MAILING LISTS

279       See http://mail.ximian.com/mailman/mono-list for details.
280

WEB SITE

282       Visit http://mono-project.com/Mod_mono for details.
283

SEE ALSO

285       xsp(1),mod-mono-server(1),mono(1),mcs(1)
286
287
288
289
290mod_mono 2.6.3                    28 Jan 2009                      mod_mono(8)
Impressum