xsp(1)
π xsp(1) β User Commands π
okay bestie, gather round, because we're about to talk about xsp and honestly? she's iconic. this is the manual page for the XSP family of ASP.NET hosts and there's a lot going on, so let's get into it. π
β¨ NAME β¨
XSP β Mono ASP.NET Web Server (xsp and xsp2) π¦
β¨ SYNOPSIS β¨
xsp [options]
or
mod-mono-server4 [options]
or
fastcgi-mono-server4 [options]
β¨ DESCRIPTION β¨
so <cyan>XSP</cyan>, <cyan>mod-mono-server4</cyan> and <cyan>fastcgi-mono-server4</cyan> are all hosts for ASP.NET-based applications. literally what they do. π
if you run it as xsp, the process spins up a minimalistic web server that hosts the ASP.NET runtime, and it's perfect for testing and debugging web apps that use the System.Web facilities in Mono. she's most convenient for testing and running small sites β but no cap, she does not offer everything a production web server offers. so like, vibe check before you ship her to prod, okay? π«Ά
mod-mono-server4 and fastcgi-mono-server4 are both ASP.NET runtime hosts that can talk to another web server (at the time of this writing, Apache 1.3-2.2 were supported through mod_mono, and several other web servers through FastCGI). this mechanism is better used for high-traffic servers or production systems, because it can integrate with the main HTTP server and leverage all of the optimizations and extensions of an existing server, while still providing the ASP.NET runtime. β¨
you can choose the communication channel used between mod_mono and mod-mono-server4. if you provide a --filename option, a unix socket is used; otherwise you can give --port to use a TCP socket. choose your fighter bestie π
β¨ OPTIONS β¨
--address addrβ sets the IP address to listen on. by default it's<yellow>0.0.0.0</yellow>forxspand<yellow>127.0.0.1</yellow>formod-mono-server4. AppSettings key name:MonoServerAddress--port PORTβ changes the default port where the XSP server will listen to requests. by default XSP listens on port<yellow>8080</yellow>andmod-mono-server4has no default. AppSettings key name:MonoServerPort--backlog Nβ the backlog of connections to set on the listener socket. by default the value is set to<yellow>500</yellow>.--minThreads Nβ the minimum number of threads the threadpool allocates. increase this value to better handle the sudden arrival of connections (the group chat getting busy, essentially π±). the default value is determined by the mono runtime.--filename file(mod-mono-server4 and fastcgi-mono-server4) β the unix socket file name to listen on. default value:/tmp/mod_mono_server(fastcgi-mono-server4:/tmp/fastcgi-mono-server4). AppSettings key name:UnixSocketFileName(fastcgi-mono-server4:MonoUnixSocket)--root PATHβ the root directory for XSP. the default is the directory where XSP is executed. the current directory will be changed to this one before creating any application. AppSettings key name:MonoServerRootDir--appconfigfile FILENAMEβ adds application definitions from the XML configuration file. see the sample configuration file that comes with the server (sample.webapp) and the WEBAPP FILE FORMAT section below. AppSettings key name:MonoApplicationsConfigFile--appconfigdir DIRβ adds application definitions from all XML files found in the specified directory DIR. files must have a'.webapp'extension. AppSettings key name:MonoApplicationsConfigDir--applications APPSβ a comma separated list of virtual directory and real directory for all the applications we want to manage with this server. the virtual and real dirs are separated by a colon. the default value is'/:.'.
some examples, bestie:
'/:.'β the virtual/is mapped to the current directory.'/blog:../myblog'β the virtual/blogis mapped to../myblog'/:.,/blog:../myblog'β two applications like the above ones are handled.myhost.someprovider.net:/blog:../myblogβ the virtual/blogatmyhost.someprovider.netis mapped to../myblog.
--masterβ this instance will be used to bymod_monoto create ASP.NET applications on demand. if this option is provided, there is no need to provide a list of applications to start. this applies only tomod-mono-server4.exe.--nonstopβ by defaultxsp/mod-mono-server4will stop processing requests when the return key is pressed. use this to avoid this behavior. (no more accidental shutdowns mid-demo π)--no-hiddenβ do not protect hidden files/directories from being accessed by clients. hidden files/directories are those with the Hidden attribute on Windows and whose name starts with a dot on Unix. any file/directory below a hidden directory is inaccessible. this option turns the default behavior of protecting such locations off. if your application does not contain any hidden files/directories, you might want to use this option as the checking process has a per-request cost. AppSettings key name:MonoServerCheckHiddenFiles(a boolean accepting'true'or'false')--httpsβ enables HTTPS support on the server. you must supply an X.509 certificate and a private key with either the--cert/--pkfileoptions or with the--p12file(which combines both the certificate and the private key into a single file).
to use it you must first create an X.509 certificate for your server, for example:
$ makecert -r -eku 1.3.6.1.5.5.7.3.1 -n "CN=server" -p12 server.p12 s3kr3t
Mono MakeCert - version 1.1.9.0
X.509 Certificate Builder
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2005 Novell. BSD licensed.
Success
then you must pass the following flags to xsp:
$ xsp --https --p12file server.p12 --pkpwd s3kr3t
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--https-client-acceptβ like--httpsthis enables HTTPS support on the server. however this option also sends an "invitation" to clients to provide client-certificates to authenticate themselves. clients are free to provide, or not, a client certificate. the web application can detect if a client certificate is used and react accordingly. most web browsers will not send a client certificate unless they have been explicitly requested to do so.
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--https-client-requireβ like--httpsthis enables HTTPS support on the server. however this option also requires clients to use client-certificates to authenticate themselves. clients who do not provide client certificates will receive an error. note that a client may send an empty certificate structure so the web application should check the certificate content. π
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--p12file FILENAMEβ used to specify the PKCS#12 file to use. this file includes both the X.509 certificate and the private key required to encrypt the HTTP traffic.
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--cert FILENAMEβ used to specify the server X.509 certificate file. this is normally used with the--pkfile.
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--pkfile FILENAMEβ used to specify the path to the private keyfile. the PVK format isn't very secure and you should use the PKCS#12 format (--p12fileoption) to store new private keys. fr fr, protect your keys. π
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--pkpwd PASSWORDβ if your private key is password protected, PASSWORD is the password used to decode the private key. this option works for both PVK and PKCS#12 formats.
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--protocol PROTOCOLβ specifies which protocols are available for encrypting the communications. the possible values areDefault,TlsandSsl3.Ssl2isn't supported. the default value is"Default"which auto-detects the client protocol and adjusts the server protocol accordingly.
this option is only valid for XSP. for mod_mono you should configure Apache for SSL/TLS.
--terminate(mod-mono-server4 only) β gracefully terminates a runningmod-mono-server4instance. all other options but--filenameor--addressand--portare ignored if this option is provided.--versionβ displays version information and exits. bye bestie π--helpβ shows the list of options and exits.--verboseβ prints extra messages. useful for debugging. (the "tell me everything" mode π£οΈ)--pidfile FILEβ writes the xsp PID to the specified file.
β¨ MONO RUNTIME OPTIONS β¨
xsp and xsp2 are scripts that call mono. if you want to pass options to mono (for example, options to get line numbers in stack traces), you can use the MONO_OPTIONS environment variable when invoking xsp or xsp2.
for example:
$ MONO_OPTIONS=--debug xsp2
β¨ DEFAULT INDEX FILES β¨
you can choose which files are considered as index using xsp.exe.config configuration file like this:
<appSettings>
<add key="MonoServerDefaultIndexFiles"
value="index.aspx" />
</appSettings>
by default, it has index.aspx, Default.aspx, default.aspx, index.html and index.htm. the order matters. π
β¨ WEBAPP FILE FORMAT β¨
the format of the .webapp files used for --appconfigfile and --appconfigdir is:
<apps>
<web-application>
<name>{appname}</name>
<vhost>{virtual host for application}</vhost>
<vport>{port for the application}</vport>
<vpath>{virtual directory in apache}</vpath>
<path>{physical path to aspx files}</path>
<!-- <enabled> is true by default -->
<enabled>{true|false}</enabled>
</web-application>
</apps>
you can include any number of <web-application> nodes, one per ASP.NET application to run.
there's a sample.webapp file in the XSP samples directory. go look, it's cute. π
β¨ AUTHORS β¨
the Mono XSP server was written by Gonzalo Paniagua Javier (gonzalo@ximian.com). Fastcgi-mono-server4 was written by Brian Nickel <http://kerrick.wordpress.com>. legends, honestly. π
β¨ ENVIRONMENT VARIABLES β¨
MONO_ASPNET_NODELETEβ if set to any value, temporary source files generated by ASP.NET support classes will not be removed. they will be kept in the user's temporary directory.
β¨ FILES β¨
Web.config,web.configβ ASP.NET applications are configured through these files, the configuration is done on a per-directory basis. for more information on this subject see the http://www.mono-project.com/Config_system.web page.
π SEE ALSO β¨
okay bestie, when you're done with this page and you're like "wait who else do I need to know", here's the squad π
mono(1)β the runtime that makes the whole thing go, obviouslydbsessmgr(1)β the session storage manager bestieasp-state(1)β session state, keeping your vibes consistentmod_mono(8)β the Apache module era, we love a crossovermakecert(1)β for when you need certificates, very secure of you π
and if you wanna get into creating certificates specifically, there's a whole writeup waiting for you at:
http://pages.infinit.net/ctech/20050701-1048.html
also the namespaces you'll be living in:
System.WebSystem.Web.Hosting
and http://www.asp.net is Microsoft's official site for ASP.NET, no cap, that's literally the source π
π MORE INFORMATION π
The Mono project (http://www.go-mono.com) is a collaborative effort led by Novell (http://www.novell.com) to implement an open source version of the .NET Framework. it's giving community, it's giving open source excellence, it's giving "we did it ourselves and it slayed" π«Ά
π¦ MAILING LISTS πΈ
Mailing lists are listed at http://www.mono-project.com/Mailing_Lists β go find your people, bestie, there's a list for every hyperfixation π
and that's the whole page, you made it to the end like the main character you are π this was xsp version 4.2, dated 21 Nov 2004, and yeah the date is older than most of us but the vibes are timeless β¨ periodt π
π¦ where this page comes from
- debian bookworm: mono-fastcgi-server4 4.2-2.4
- ubuntu jammy: mono-fastcgi-server4 4.2-2.3
- ubuntu noble: mono-fastcgi-server4 4.2-2.5
- Copyright 2003 Ximian, Inc
- Copyright 2004-2007 Novell, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms