ASP.NET with Apache

Describes how to show ASP.NET-sites under Apache HTTP Server by using Mod_Mono.

From Mod_Mono's site:

"Mod_Mono is an Apache 2.0/2.2 module that provides ASP.NET support for the web's favorite server, Apache (https://httpd.apache.org/)."
Warning: The Apache module mod-mono along with the web server xsp (which mod-mono depends) has not been in active development since April 2018 and may therefore have issues with updated Arch Linux systems as well as possible security vulnerabilities.

Installing

The setup requires mono and mod_monoAUR for Apache compliance. Package xspAUR is a simple webserver for ASP.NET, optionally installed for testing the configuration.

Configuring

Add the following line to /etc/httpd/conf/httpd.conf:

 Include /etc/httpd/conf/extra/mod_mono.conf

Finally, restart httpd.service.

Now, Apache should be able to show ASP.NET-pages.

AutoHosting

Further details: https://www.mono-project.com/AutoHosting/

With this setting, configuring apache for each deployment is no longer needed; just place the application in any directory within html-root and it will be promptly auto-configured. Add the following lines to /etc/httpd/conf/httpd.conf to enable the option:

 # Choose ASP2.0 support instead of the default 1.0
 MonoServerPath "/usr/bin/mod-mono-server4" # mono 4
 MonoAutoApplication enabled

Testing

If xsp is installed and html-path is /httpd/html, then open a browser and access http://server/xsp/ to see an overview over the ASP.NET-testfiles.

Troubleshooting

Application/Site Instance Hangs with high cpu usage.

This is believed to be caused by a bug/incompatibility in the mod-mono module with SystemD versions above 239.303.

Currently there is no fix (other than a workaround) as the project appears to have ceased development.

See https://github.com/mono/mod_mono/issues/9 for more information.

gollark: They're both OFDMA-based, admittedly use somewhat different frequency ranges, just carry IP packets nowadays, are increasingly going for ridiculous data rates, are often implemented in the same devices, that sort of thing.
gollark: Anyway, as far as I know, modern WiFi and 4G/5G aren't actually that different, so them somehow being munged together is inevitable and inescapable.
gollark: Indeed.
gollark: The USB 3.2 Gen2x2 stuff is stupid, but it's basically fine.
gollark: What?
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.