[Mono-aspnet-list] Is this a serious flaw or just my mistake?

Diego Frata diego.frata at gmail.com
Tue Jul 28 15:22:12 EDT 2009


Try setting the configuration for each virtual host instead using the
mod_mono.conf.

Eg:

<VirtualHost *:80>
  ServerName my-mono-site.com
  ServerAdmin web-admin at my-mono-site.com
  DocumentRoot /srv/www/my-mono-site.com
*  MonoServerPath my-mono-site.com "/usr/bin/mod-mono-server2"
  MonoSetEnv my-mono-site.com MONO_IOMAP=all
  MonoApplications my-mono-site.com "/:/srv/www/my-mono-site.com"
*  <Location "/">
    Allow from all
    Order allow,deny
*    MonoSetServerAlias my-mono-site.com*
*    SetHandler mono*
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml
text/javascript
  </IfModule>
</VirtualHost>

Diego Frata
diego.frata at gmail.com


On Tue, Jul 28, 2009 at 1:02 PM, Batchwood <jghsurfpro at hotmail.com> wrote:

>
> My earlier post and subsequent research regarding virtual hosting has led
> me
> to suspect that Mono may have a serious flaw. Perhaps I’m missing something
> very basic, but judging by the absence of replies to my earlier post, maybe
> not.
>
> I’m convinced that ASP.net and Mono have a very bright future. ASP.net
> removes many of the issues previously associated with writing complex web
> applications. As long as Microsoft doesn’t screw it up it’s going to be
> very
> popular.  Mono on the other hand opens this technology up to a much wider
> audience. The two are a great combination.
>
> Here’s the issue. In order for Mono to really grab the ASP.net market, it
> needs to accommodate the ISP’s. If ISP’s can run their ASP.net web hosts on
> a Linux server instead of the much more expensive Windows box, it will be
> very beneficial. I’m not an experienced System Administrator, but I haven’t
> been able to setup web hosting on Mono. Although setting up multiple web
> sites is easy on Mono, setting up web hosts each with their own domain name
> (ie www.example.com, www.example2.com etc), isn’t. With Apache, this is
> done
> using VirtualHosts in the apache2.conf file and then setting the ServerName
> to the web hosts domain name; however, when I tried this under Mono, Apache
> won’t re-start. One poster suggested that this is an Apache problem rather
> than a Mono issue, but VirtualHosts works fine in native Apache and it’s
> the
> introduction of the Mono include statement (Include
> /etc/apache2/sites-enabled/) that causing the problem so why would the
> Apache people know how to fix it?
>
> This is what I’ve tried (using many different variations of syntax):
>
> Sites-available Settings
> I followed the Mono documentation like this:
>  In a file called example.com, I added
>  Alias /example "/var/www/example "
>  AddMonoApplications default "/example:/var/www/example "
>  <Location /example >
>        SetHandler mono
>  </Location>
> I then run a2ensite exmple and then /etc/init.d/apache2 restart
>
> Sites-available/default Settings
> I tried adding this to the default file:
> <VirtualHost *:80>
>        ServerName www.example.com
>        ServerAdmin webmaster at localhost
>        DocumentRoot /var/www/example
>        <Directory />
>                Options FollowSymLinks
>                AllowOverride None
>        </Directory>
>        <Directory /var/www/example/>
>                Options Indexes FollowSymLinks MultiViews
>                AllowOverride None
>                Order allow,deny
>                allow from all
>        </Directory>
>        ErrorLog /var/log/apache2/error.log
>        LogLevel warn
>        CustomLog /var/log/apache2/access.log combined
>    Alias /doc/ "/usr/share/doc/"
>    <Directory "/usr/share/doc/">
>        Options Indexes MultiViews FollowSymLinks
>        AllowOverride None
>        Order deny,allow
>        Deny from all
>        Allow from 127.0.0.0/255.0.0.0 ::1/128
>    </Directory>
>
> I don’t believe that something as well designed as Mono can be missing
> something as basic as virtualHosting, so I’m probably doing something
> wrong.
> I’ve spent days researching and experimenting this but have not found a
> solution. My concern is that others will be turned away from such a good
> technology because they too can’t find an answer. If someone can give me
> some direction, perhaps it will not only help me but be a source of
> information for others trying to find a solution to this issue.
>
> --
> View this message in context:
> http://www.nabble.com/Is-this-a-serious-flaw-or-just-my-mistake--tp24702520p24702520.html
> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20090728/e04608ea/attachment.html 


More information about the Mono-aspnet-list mailing list