Linux command
xsp 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start server
xsp
Specify port
xsp --port [8080]
Set root directory
xsp --root [/var/www]
Enable HTTPS
xsp --https --p12file [server.p12] --pkpwd [password]
Run ASP.NET 4
xsp4
Bind to address
xsp --address [0.0.0.0]
说明
xsp is a lightweight standalone web server included with the Mono project for hosting ASP.NET applications on Linux and other Unix-like systems. It serves as a development and testing server, providing a quick way to run ASP.NET WebForms and MVC applications without requiring a full web server setup. The server supports HTTPS via PKCS#12 certificate files and can bind to specific addresses and ports. For production deployments, xsp should be replaced with mod_mono behind Apache or a similar reverse proxy configuration that provides better performance and security.
参数
- --port _PORT_
- Listen port (default 8080).
- --root _PATH_
- Application root directory.
- --address _IP_
- Bind address.
- --https
- Enable HTTPS.
- --p12file _FILE_
- PKCS#12 certificate file.
- --pkpwd _PASSWORD_
- Certificate password.
- --nonstop
- Don't stop on ENTER.
FAQ
What is the xsp command used for?
xsp is a lightweight standalone web server included with the Mono project for hosting ASP.NET applications on Linux and other Unix-like systems. It serves as a development and testing server, providing a quick way to run ASP.NET WebForms and MVC applications without requiring a full web server setup. The server supports HTTPS via PKCS#12 certificate files and can bind to specific addresses and ports. For production deployments, xsp should be replaced with mod_mono behind Apache or a similar reverse proxy configuration that provides better performance and security.
How do I run a basic xsp example?
Run `xsp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --port _PORT_ do in xsp?
Listen port (default 8080).