Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
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 '11 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 '11 at 11:12

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.