[Mono-aspnet-list] Run site in root directory

Batchwood jghsurfpro at hotmail.com
Tue Jul 14 11:54:29 EDT 2009



Batchwood wrote:
> 
> Hi All,
> I've just installed Mono version 2.0.50727.42 on my Ubuntu 9.04 server and
> I'm very pleased with it.
> 
> I tested my site in a test directory off the root
> (www.example.com/testASP/default.aspx) and it worked fine after setting up
> the site configuration in the sites-available directory; however, when I
> move the site into production in the root directory, it won't run
> properly. Every time I run www.example.com/default.aspx mono tries to open
> the file with a dialog box asking me what firefox should do with the aspx
> file.
> 
> I've spent some time looking at tutorials and forum posts but can't find
> what I've done wrong. Can anyone give me any direction as to what I've
> missed?
> 
> Thanks in advance.
> 

OK - I'm not sure if this is the correct way to fix this problem, but this
is what I did. Hope it helps someone else:

Create site configuration file:
  vi /etc/apache2/sites-available/example.com (use your domain name)
  add the following to file:
  Alias / "/var/www/ "
  AddMonoApplications default "/:/var/www/ "
  <Location / >
  SetHandler mono
  </Location>
  save and close file
  a2ensite example.com
  /etc/init.d/apache2 restart

This fix not only displayed the default.aspx file when I entered my domain
name in my browser but also displayed it when I just typed my IP address
into the browser. 
-- 
View this message in context: http://www.nabble.com/Run-site-in-root-directory-tp24479419p24482378.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list