4

I am trying mod_mono on apache 2.2.x running on a win7 box – followed the steps described here.

The module loads Ok, but I can't run my ASP.net application (404). Does anybody have any suggestions or an example configuration that works? Thanks.

svick
  • 236,525
  • 50
  • 385
  • 514
SorinS
  • 180
  • 1
  • 12
  • Could you post the relevant portions of your httpd.conf? If you're getting a generic 404, it could be a problem with your VirtualHost entry, but that's just a random guess since I can't see the actual config. – Kris Craig Dec 12 '11 at 22:14
  • Hi Kris, the configuration used was the one in the link provided. I checked the VH with a static page and works, so I reckon there is something wrong with the module itself. – SorinS Dec 21 '11 at 11:01
  • 1
    how did you get mod_mono.so? – Chazt3n Nov 15 '12 at 22:23

2 Answers2

1

My working config:

<VirtualHost *:80>
    ServerAlias localhost
    DocumentRoot "c:\web\mysite"
    MonoServerPath mysite "c:\mono\usr\bin\mod-mono-server2.exe"
    MonoApplications mysite "/:c:\web\mysite"

    <Directory "c:\web\mysite">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        MonoSetServerAlias mysite
        SetHandler mono
        DirectoryIndex default.aspx index.html
    </Directory>
</VirtualHost>
balint
  • 3,391
  • 7
  • 41
  • 50
  • I am curious how did you get mod_mono to compile, can you share what compiler, mono version, etc used? – SorinS Dec 19 '11 at 14:38
1

I found a good tutorial for you.

Example mono configuration:

MonoServerPath default /usr/bin/mod-mono_server2
Alias [D] “[P]”
AddMonoApplications default “[D]:[P]”
<Location [D]>
SetHandler mono
</Location>

Another example:

MonoServerPath default /usr/bin/mod-mono_server2
Alias /MySite “/srv/www/htdocs/MySite”
AddMonoApplications default “/MySite:/srv/www/htdocs/MySite”
<Location /MySite>
SetHandler mono
</Location>
Predator
  • 1,267
  • 3
  • 17
  • 43
  • The tutorial is very good (therefore the vote), unfortunately it is intended for Linux. How about the same for windows. I was not able to compile mod_mono (2.8) so looking forward for anyone that can share some tips. – SorinS Dec 19 '11 at 14:35