This is almost a wiki post, but the MonoSetEnv MONO_IOMAP=all options does not work for me in Apache2 w/ Ubuntu as specified in what I understand is the official doc.

 <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    MonoAutoApplication disabled
    MonoSetEnv MONO_IOMAP=all
    MonoDebug true
    MonoApplications "/myapp:/pathto/myapp"
    MonoServerPath "/usr/bin/mod-mono-server4"
...

There seems to be a new syntax to specify it. MonoIOMAP all as in the following:

 <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    MonoAutoApplication disabled
    MonoIOMAP all
    MonoDebug true
    MonoApplications "/myapp:/pathto/myapp"
    MonoServerPath "/usr/bin/mod-mono-server4"

Is this specific to Ubuntu or mono-server4?

Most posts still mention the MonoSetEnv way, I only found this one related to an orchard CMS issue that hinted me to the new syntax...

Versions in use

Ubuntu Server 12.04.2 LTS
Server version: Apache/2.2.22 (Ubuntu)
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)
mono-server4

有帮助吗?

解决方案

It's documented in the mod_mono (8) man page as follows:

"MonoIOMAP"
Takes alias name and a string of the same format and meaning as the MONO_IOMAP
environment variable (see the mono(1) manpage). The effect is that mod_mono performs
the same actions as mono runtime with MONO_IOMAP in effect, as well as that the
MONO_IOMAP variable with the specified value is exported in the backend environment.
This option is necessary when you're using MONO_IOMAP in your application and there
might be static files with mixed case names - in such case mod_mono attempts to open
the file directly and sends it using apache facilities.
Default value: none

The MonoSetEnv should still work, however mod-mono itself won't act on that setting except to pass it on in the environment.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top