1

I installed Mono on Windows 7, followed the instructions at http://www.mono-project.com/Using_Mono_on_Windows#Using_Mono_on_Windows and the command prompt worked.

Mod_mono was added to httpd.conf, and theoreticlaly, it should work.

However, I want one of my vhosts to run asp.net via mod_mono.

Here it is:

    <VirtualHost *:80>
ServerName www.joebloggstest1.co.uk 
ServerAlias joebloggstest1.co.uk
DocumentRoot /www/joebloggstest1.co.uk
</VirtualHost>
    <Directory "/www/joebloggstest1.co.uk">
        Options All
        AllowOverride All
        order allow,deny
        allow from all
    </Directory>
    </VirtualHost>

I could not find how to do it for Windows on Google, only Linux/Ubuntu distros, which isn't useful for my situation.

mod_mono is installed, this is from httpd.conf:

Include conf/mod_mono.conf 
AddHandler mono .aspx .asp .ascx .asax .ashx .config .cs .asmx .axd

<Location /mono>
  SetHandler mono-ctrl
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1
</Location>

What would you do to fix this?

2 Answers 2

0

Try this:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName www.joebloggstest1.co.uk
  ServerAlias joebloggstest1.co.uk
  DocumentRoot /www/joebloggstest1.co.uk
  <Directory "/">
       Options All
       AllowOverride All
       order allow,deny
       allow from all
  </Directory>
</VirtualHost>

You should put the directory tag inside the vHost tag. Make sure your server will support execution of these scripts too. ALSO: You should just do "directory as /" as noted above. Otherwise you'd have to go to joebloggstest1.couk/joebloggstest.co.uk.

2
  • Do you only want to allow access from 127.0.0.1? And at the top of httpd.conf, do you have a LoadModule mod_mono.so or something similar? ALSO: In windows, do not use /www/website. Do something like "C:\website\www.name.com\files" in quotes.
    – U4iK_HaZe
    Sep 18, 2011 at 1:05
  • -1 for the Directory "/" suggestion - I think you've confused Directory and Location, and your suggestion that "you'd have to go to joebloggstest1.couk/joebloggstest.co.uk" is not correct.
    – nickgrim
    Nov 15, 2011 at 11:12
1

Why not just use linux? It's not so difficult to setup a full working server on a distro with good mono packages support. I recommend using nginx (my personal choise) or apache.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .