1xsp(1)                           User Commands                          xsp(1)
2
3
4

NAME

6       XSP - Mono ASP.NET Web Server (xsp and xsp2)
7

SYNOPSIS

9       xsp [options]
10
11       or
12
13       mod-mono-server [options]
14
15       or
16
17       fastcgi-mono-server [options]
18

DESCRIPTION

20       XSP,  mod-mono-server  and  fastcgi-mono-server  are hosts for ASP.NET-
21       based applications.
22
23       If run as `xsp', the process provides a minimalistic web  server  which
24       hosts  the ASP.NET runtime and can be used to test and debug web appli‐
25       cations that use the System.Web facilities in  Mono.   This  server  is
26       most  convenient  for  testing  and running small sites, does not offer
27       everything a production web server offers.
28
29       `mod-mono-server' and 'fastcgi-mono-server' are both  ASP.NET  runtimes
30       hosts that can communicate with another web server (at the time of this
31       writing, Apache 1.3-2.2 were supported  through  mod_mono  and  several
32       other  web servers through FastCGI).  This mechanism is better used for
33       high-traffic servers or production systems, since it can integrate with
34       the  main  HTTP server and leverage all of the optimizations and exten‐
35       sions of an existing server, while providing the ASP.NET  runtime.  You
36       can  choose  the  communication  channel used between mod_mono and mod-
37       mono-server. If you provide a --filename option, a unix socket is used,
38       otherwise you can give --port to use a TCP socket.
39

OPTIONS

41       --address addr
42              Sets  the  IP  address to listen on. By default it's 0.0.0.0 for
43              xsp and 127.0.0.1 for mod-mono-server.   AppSettings  key  name:
44              MonoServerAddress
45
46       --port PORT
47              Changes  the  default  port  where the XSP server will listen to
48              requests.  By default XSP listens on  port  8080  and  mod-mono-
49              server has no default.  AppSettings key name: MonoServerPort
50
51       --filename file (mod-mono-server and fastcgi-mono-server)
52              The  unix  socket  file  name  to  listen  on.   Default  value:
53              /tmp/mod_mono_server  (fastcgi-mono-server:   /tmp/fastcgi-mono-
54              server)  AppSettings key name: UnixSocketFileName (fastcgi-mono-
55              server: MonoUnixSocket)
56
57       --root PATH
58              The root directory for XSP.  The default is the directory  where
59              XSP  is  executed. The current directory will be changed to this
60              one before creating  any  application.   AppSettings  key  name:
61              MonoServerRootDir
62
63       --appconfigfile FILENAME
64              Adds  application  definitions  from the XML configuration file.
65              See sample configuration file that comes with the  server  (sam‐
66              ple.webapp) and WEBAPP FILE FORMAT below.  AppSettings key name:
67              MonoApplicationsConfigFile
68
69       --appconfigdir DIR
70              Adds application definitions from all XML  files  found  in  the
71              specified  directory  DIR.  Files must have '.webapp' extension.
72              AppSettings key name: MonoApplicationsConfigDir
73
74       --applications APPS
75              A comma separated list of virtual directory and  real  directory
76              for all the applications we want to manage with this server. The
77              virtual and real dirs. are separated by  a  colon.  The  default
78              value is '/:.'.
79
80       Some examples:
81
82       '/:.'  The virtual / is mapped to the current directory.
83
84       '/blog:../myblog'
85              The virtual /blog is mapped to ../myblog
86
87       '/:.,/blog:../myblog'
88              Two applications like the above ones are handled.
89
90       myhost.someprovider.net:/blog:../myblog
91              The  virtual  /blog  at  myhost.someprovider.net  is  mapped  to
92              ../myblog.
93
94       --master
95
96       This instance will be used to by mod_mono to create ASP.NET
97              applications on demand. If this option is provided, there is  no
98              need  to  provide a list of applications to start.  This applies
99              only to mod-mono-server.exe.  --nonstop By default xsp/mod-mono-
100              server  will  stop  processing  requests  when the return key is
101              pressed.  Use this to avoid this behavior.
102
103       --no-hidden
104              Do not protect hidden files/directories from being  accessed  by
105              clients.   Hidden   files/directories   are  those  with  Hidden
106              attribute on Windows and whose name starts with a dot  on  Unix.
107              Any file/directory below a hidden directory is inacessible. This
108              option turns the default behavior of protecting  such  locations
109              off.   If   your   application   does  not  contain  any  hidden
110              files/directories, you might want to  use  this  option  as  the
111              checking  process has a per-request cost.  AppSettings key name:
112              MonoServerCheckHiddenFiles  (a  boolean  accepting   'true'   or
113              'false')
114
115       --https
116              Enables  HTTPS  support  on the server, you must supply an X.509
117              certificate and a private key with  either  the  --cert/--pkfile
118              options  or with the --p12file (which combines both the certifi‐
119              cate and the private key into a single file).
120
121       To use you must first create an X.509 certificate for your server, for
122              example:
123                   $ makecert -r -eku 1.3.6.1.5.5.7.3.1 -n "CN=server" -p12 server.p12 s3kr3t
124                   Mono MakeCert - version 1.1.9.0
125                   X.509 Certificate Builder
126                   Copyright 2002, 2003 Motus Technologies. Copyright 2004-2005 Novell. BSD licensed.
127
128                   Success
129
130       Then you must pass the following flags to xsp:
131                   $ xsp --https --p12file server.p12 --pkpwd s3kr3t
132
133       This option is only valid for XSP. For mod_mono  you  should  configure
134              Apache for SSL/TLS.
135
136       --https-client-accept
137              Like  --https  this enables HTTPS support on the server. However
138              this option also send an  "invitation"  to  clients  to  provide
139              client-certificates  to authenticate themselves. Client are free
140              to provide, or not, a client certificate.  Web  application  can
141              detect  if  a  client certificate is used and react accordingly.
142              Most web browser will not send a client certificate unless  they
143              have been explicitly requested to do so.
144
145       This  option  is  only valid for XSP. For mod_mono you should configure
146              Apache for SSL/TLS.
147
148       --https-client-require
149              Like --https this enables HTTPS support on the  server.  However
150              this  option also requires clients to use client-certificates to
151              authenticate themselves. Client who do not provide  client  cer‐
152              tificates  will  receive  an error. Note that client may send an
153              empty certificate structure so web application should check  the
154              certificate content.
155
156       This  option  is  only valid for XSP. For mod_mono you should configure
157              Apache for SSL/TLS.
158
159       --p12file FILENAME
160              Used to specify the PKCS#12 file to use. This file includes both
161              the  X.509  certificate  and the private key required to encrypt
162              the HTTP traffic.
163
164       This option is only valid for XSP. For mod_mono  you  should  configure
165              Apache for SSL/TLS.
166
167       --cert FILENAME
168              Used  to specify the server X.509 certificate file. This is nor‐
169              mally used with the --pkfile.
170
171       This option is only valid for XSP. For mod_mono  you  should  configure
172              Apache for SSL/TLS.
173
174       --pkfile FILENAME
175              Used  to specify the path to the private keyfile. The PVK format
176              isn't  very  secure  and  you  should  use  the  PKCS#12  format
177              (--p12file option) to store new private keys.
178
179       This  option  is  only valid for XSP. For mod_mono you should configure
180              Apache for SSL/TLS.
181
182       --pkpwd PASSWORD
183              If your private key is password protected, PASSWORD is the pass‐
184              word  used to decote the private key. This option works for both
185              PVK and PKCS#12 formats.
186
187       This option is only valid for XSP. For mod_mono  you  should  configure
188              Apache for SSL/TLS.
189
190       --protocol PROTOCOL
191              Specifies  which protocols are available for encrypting the com‐
192              munications.  The possible values are  Default,  Tls  and  Ssl3.
193              Ssl2  isn't  supported.   The  default  value is "Default" which
194              auto-detect the client protocol and adjust the  server  protocol
195              accordingly.
196
197       This  option  is  only valid for XSP. For mod_mono you should configure
198              Apache for SSL/TLS.
199
200       --terminate (mod-mono-server only)
201              Gracefully terminates a running mod-mono-server  instance.   All
202              other options but --filename or --address and --port are ignored
203              if this option is provided.
204
205       --version
206              Displays version information and exits.
207
208       --help Shows the list of options and exits.
209
210       --verbose
211              Prints extra messages. Useful for debugging.
212
213       --pidfile FILE
214              Writes the xsp PID to the specified file.
215

MONO RUNTIME OPTIONS

217       xsp and xsp2 are scripts that call mono.  If you want to  pass  options
218       to mono (for example, options to get line numbers in stack traces), you
219       can use the MONO_OPTIONS environment  variable  when  invoking  xsp  or
220       xsp2.
221
222       For example:
223            $ MONO_OPTIONS=--debug xsp2
224

DEFAULT INDEX FILES

226       You can choose which files are considered as index using xsp.exe.config
227       configuration file like this:
228
229           <appSettings>
230           <add key="MonoServerDefaultIndexFiles"
231                value="index.aspx" />
232           </appSettings>
233
234       By default, it has index.aspx, Default.aspx,  default.aspx,  index.html
235       and index.htm. The order matters.
236
237

WEBAPP FILE FORMAT

239       The  format of the .webapp files used for --appconfigfile and --appcon‐
240       figdir is:
241
242       <apps>
243       <web-application>
244               <name>{appname}</name>
245               <vhost>{virtual host for application}</vhost>
246               <vport>{port for the application}</vport>
247               <vpath>{virtual directory in apache}</vpath>
248               <path>{physical path to aspx files}</path>
249               <!-- <enabled> is true by default -->
250               <enabled>{true|false}</enabled>
251       </web-application>
252       </apps>
253
254       You can include any number of <web-application> nodes, one per  ASP.NET
255       application to run.
256
257       There's a sample.webapp file in the XSP samples directory.
258
259

AUTHORS

261       The  Mono  XSP  server  was  written  by  Gonzalo Paniagua Javier (gon‐
262       zalo@ximian.com).  Fastcgi-mono-server  was  written  by  Brian  Nickel
263       <http://kerrick.wordpress.com>.
264

ENVIRONMENT VARIABLES

266       MONO_ASPNET_NODELETE
267              If set to any value, temporary source files generated by ASP.NET
268              support classes will not be removed. They will be  kept  in  the
269              user's temporary directory.
270

FILES

272       Web.config, web.config
273              ASP.NET  applications  are  configured  through these files, the
274              configuration is done on a per-directory basis.  For more infor‐
275              mation  on this subject see the http://www.mono-project.com/Con
276              fig_system.web page.
277

SEE ALSO

279       mono(1),dbsessmgr(1),asp-state(1),mod_mono(8),makecert(1)
280
281       For    more    information    on    creating     certificates,     see:
282       http://pages.infinit.net/ctech/20050701-1048.html
283
284       System.Web, System.Web.Hosting namespaces.
285
286       http://www.asp.net is Microsoft's official site for ASP.NET
287

MORE INFORMATION

289       The Mono project (http://www.go-mono.com) is a collaborative effort led
290       by Novell (http://www.novell.com) to implement an open  source  version
291       of the .NET Framework.
292

MAILING LISTS

294       Mailing  lists  are  listed  at  the  http://www.mono-project.com/Mail
295       ing_Lists
296
297
298
299
300xsp 2.6.5                         21 Nov 2004                           xsp(1)
Impressum