1xsp(1) User Commands xsp(1)
2
3
4
6 XSP - Mono ASP.NET Web Server (xsp and xsp2)
7
9 xsp [options]
10
11 or
12
13 mod-mono-server [options]
14
15 or
16
17 fastcgi-mono-server [options]
18
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
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 --backlog N
52 The backlog of connections to set on the listener socket. By
53 default the value is set to 500.
54
55 --minThreads N
56 The minimum number of threads the threadpool allocates. Increase
57 this value to better handle the sudden arrival of connections.
58 The default value is determined by the mono runtime.
59
60 --filename file (mod-mono-server and fastcgi-mono-server)
61 The unix socket file name to listen on. Default value:
62 /tmp/mod_mono_server (fastcgi-mono-server: /tmp/fastcgi-mono-
63 server) AppSettings key name: UnixSocketFileName (fastcgi-mono-
64 server: MonoUnixSocket)
65
66 --root PATH
67 The root directory for XSP. The default is the directory where
68 XSP is executed. The current directory will be changed to this
69 one before creating any application. AppSettings key name:
70 MonoServerRootDir
71
72 --appconfigfile FILENAME
73 Adds application definitions from the XML configuration file.
74 See sample configuration file that comes with the server (sam‐
75 ple.webapp) and WEBAPP FILE FORMAT below. AppSettings key name:
76 MonoApplicationsConfigFile
77
78 --appconfigdir DIR
79 Adds application definitions from all XML files found in the
80 specified directory DIR. Files must have '.webapp' extension.
81 AppSettings key name: MonoApplicationsConfigDir
82
83 --applications APPS
84 A comma separated list of virtual directory and real directory
85 for all the applications we want to manage with this server. The
86 virtual and real dirs. are separated by a colon. The default
87 value is '/:.'.
88
89 Some examples:
90
91 '/:.' The virtual / is mapped to the current directory.
92
93 '/blog:../myblog'
94 The virtual /blog is mapped to ../myblog
95
96 '/:.,/blog:../myblog'
97 Two applications like the above ones are handled.
98
99 myhost.someprovider.net:/blog:../myblog
100 The virtual /blog at myhost.someprovider.net is mapped to
101 ../myblog.
102
103 --master
104
105 This instance will be used to by mod_mono to create ASP.NET
106 applications on demand. If this option is provided, there is no
107 need to provide a list of applications to start. This applies
108 only to mod-mono-server.exe. --nonstop By default xsp/mod-mono-
109 server will stop processing requests when the return key is
110 pressed. Use this to avoid this behavior.
111
112 --no-hidden
113 Do not protect hidden files/directories from being accessed by
114 clients. Hidden files/directories are those with Hidden
115 attribute on Windows and whose name starts with a dot on Unix.
116 Any file/directory below a hidden directory is inacessible. This
117 option turns the default behavior of protecting such locations
118 off. If your application does not contain any hidden
119 files/directories, you might want to use this option as the
120 checking process has a per-request cost. AppSettings key name:
121 MonoServerCheckHiddenFiles (a boolean accepting 'true' or
122 'false')
123
124 --https
125 Enables HTTPS support on the server, you must supply an X.509
126 certificate and a private key with either the --cert/--pkfile
127 options or with the --p12file (which combines both the certifi‐
128 cate and the private key into a single file).
129
130 To use you must first create an X.509 certificate for your server, for
131 example:
132 $ makecert -r -eku 1.3.6.1.5.5.7.3.1 -n "CN=server" -p12 server.p12 s3kr3t
133 Mono MakeCert - version 1.1.9.0
134 X.509 Certificate Builder
135 Copyright 2002, 2003 Motus Technologies. Copyright 2004-2005 Novell. BSD licensed.
136
137 Success
138
139 Then you must pass the following flags to xsp:
140 $ xsp --https --p12file server.p12 --pkpwd s3kr3t
141
142 This option is only valid for XSP. For mod_mono you should configure
143 Apache for SSL/TLS.
144
145 --https-client-accept
146 Like --https this enables HTTPS support on the server. However
147 this option also send an "invitation" to clients to provide
148 client-certificates to authenticate themselves. Client are free
149 to provide, or not, a client certificate. Web application can
150 detect if a client certificate is used and react accordingly.
151 Most web browser will not send a client certificate unless they
152 have been explicitly requested to do so.
153
154 This option is only valid for XSP. For mod_mono you should configure
155 Apache for SSL/TLS.
156
157 --https-client-require
158 Like --https this enables HTTPS support on the server. However
159 this option also requires clients to use client-certificates to
160 authenticate themselves. Client who do not provide client cer‐
161 tificates will receive an error. Note that client may send an
162 empty certificate structure so web application should check the
163 certificate content.
164
165 This option is only valid for XSP. For mod_mono you should configure
166 Apache for SSL/TLS.
167
168 --p12file FILENAME
169 Used to specify the PKCS#12 file to use. This file includes both
170 the X.509 certificate and the private key required to encrypt
171 the HTTP traffic.
172
173 This option is only valid for XSP. For mod_mono you should configure
174 Apache for SSL/TLS.
175
176 --cert FILENAME
177 Used to specify the server X.509 certificate file. This is nor‐
178 mally used with the --pkfile.
179
180 This option is only valid for XSP. For mod_mono you should configure
181 Apache for SSL/TLS.
182
183 --pkfile FILENAME
184 Used to specify the path to the private keyfile. The PVK format
185 isn't very secure and you should use the PKCS#12 format
186 (--p12file option) to store new private keys.
187
188 This option is only valid for XSP. For mod_mono you should configure
189 Apache for SSL/TLS.
190
191 --pkpwd PASSWORD
192 If your private key is password protected, PASSWORD is the pass‐
193 word used to decote the private key. This option works for both
194 PVK and PKCS#12 formats.
195
196 This option is only valid for XSP. For mod_mono you should configure
197 Apache for SSL/TLS.
198
199 --protocol PROTOCOL
200 Specifies which protocols are available for encrypting the com‐
201 munications. The possible values are Default, Tls and Ssl3.
202 Ssl2 isn't supported. The default value is "Default" which
203 auto-detect the client protocol and adjust the server protocol
204 accordingly.
205
206 This option is only valid for XSP. For mod_mono you should configure
207 Apache for SSL/TLS.
208
209 --terminate (mod-mono-server only)
210 Gracefully terminates a running mod-mono-server instance. All
211 other options but --filename or --address and --port are ignored
212 if this option is provided.
213
214 --version
215 Displays version information and exits.
216
217 --help Shows the list of options and exits.
218
219 --verbose
220 Prints extra messages. Useful for debugging.
221
222 --pidfile FILE
223 Writes the xsp PID to the specified file.
224
226 xsp and xsp2 are scripts that call mono. If you want to pass options
227 to mono (for example, options to get line numbers in stack traces), you
228 can use the MONO_OPTIONS environment variable when invoking xsp or
229 xsp2.
230
231 For example:
232 $ MONO_OPTIONS=--debug xsp2
233
235 You can choose which files are considered as index using xsp.exe.config
236 configuration file like this:
237
238 <appSettings>
239 <add key="MonoServerDefaultIndexFiles"
240 value="index.aspx" />
241 </appSettings>
242
243 By default, it has index.aspx, Default.aspx, default.aspx, index.html
244 and index.htm. The order matters.
245
246
248 The format of the .webapp files used for --appconfigfile and --appcon‐
249 figdir is:
250
251 <apps>
252 <web-application>
253 <name>{appname}</name>
254 <vhost>{virtual host for application}</vhost>
255 <vport>{port for the application}</vport>
256 <vpath>{virtual directory in apache}</vpath>
257 <path>{physical path to aspx files}</path>
258 <!-- <enabled> is true by default -->
259 <enabled>{true|false}</enabled>
260 </web-application>
261 </apps>
262
263 You can include any number of <web-application> nodes, one per ASP.NET
264 application to run.
265
266 There's a sample.webapp file in the XSP samples directory.
267
268
270 The Mono XSP server was written by Gonzalo Paniagua Javier (gon‐
271 zalo@ximian.com). Fastcgi-mono-server was written by Brian Nickel
272 <http://kerrick.wordpress.com>.
273
275 MONO_ASPNET_NODELETE
276 If set to any value, temporary source files generated by ASP.NET
277 support classes will not be removed. They will be kept in the
278 user's temporary directory.
279
281 Web.config, web.config
282 ASP.NET applications are configured through these files, the
283 configuration is done on a per-directory basis. For more infor‐
284 mation on this subject see the http://www.mono-project.com/Con‐
285 fig_system.web page.
286
288 mono(1),dbsessmgr(1),asp-state(1),mod_mono(8),makecert(1)
289
290 For more information on creating certificates, see:
291 http://pages.infinit.net/ctech/20050701-1048.html
292
293 System.Web, System.Web.Hosting namespaces.
294
295 http://www.asp.net is Microsoft's official site for ASP.NET
296
298 The Mono project (http://www.go-mono.com) is a collaborative effort led
299 by Novell (http://www.novell.com) to implement an open source version
300 of the .NET Framework.
301
303 Mailing lists are listed at the http://www.mono-project.com/Mail‐
304 ing_Lists
305
306
307
308
309xsp 4.7.1 21 Nov 2004 xsp(1)