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

Jan van der watt janvanderwatt at gmail.com
Sun Aug 16 20:36:06 EDT 2009


Hi,
Virtual hosting on Mono is definitely possible. I serve several virtual
hosts under Apache on an openSUSE 11 box, some running Mono, some just PHP.

Sure, there are some quirks, but I am a big supporter of what the Mono team
has accomplished so far, given the enormous task and its complexity. In
fact, it's nothing short of amazing, and well worth assisting in ironing out
the last few oddities.

I too have found some examples on the Mono docs confusing and couldn't get
them to work, presumably also because I'm missing a step that is obvious to
someone with lots of experience, but not clearly written down on the Mono
pages yet.

I iterated until I got to this procedure and config file structure, now
working on several machines:

- clean minimal install of openSUSE (11).
- use a package manager (e.g. YAST) to add apache2, mono-complete,
(mysql/vsftpd), apache2-mod_mono, (apache2-mod_php5).
- uncomment the #NameVirtualHost *:80 in /etc/apache2/listen.conf
- allow the default server to include mod_mono.conf
(/etc/apache2/default-server.conf includes all file in /etc/apache2/conf.d
by default)

<VirtualHost *:80>
    ServerName site.domain
    ServerAlias www.site.domain
    ServerAdmin admin at site.domain
    DocumentRoot "/home/username/htdocs"
    ErrorLog "/var/log/apache2/www.site.domain-error_log"
    CustomLog "/var/log/apache2/www.site.domain-access_log" common
    <Directory "/home/username/htdocs">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
  <Location "/">
    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>

I had issues with using the Mono directives (can't remember which ones,
sorry).

Hope this helps someone.

Best regards

Jan



On Wed, Aug 5, 2009 at 10:53 AM, Batchwood <jghsurfpro at hotmail.com> wrote:

>
>
> Diego Frata wrote:
> >
> > 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
> >
> >
>
> thank you for your response, Diego. I tried for many hours to make this
> work
> with no luck. It appears that virtual hosting is not possible in mono.
> Therefore, unfortunately, it's back to PHP where I know that virtual
> hosting
> works in native Apache. This is really too bad because ASP.net is so much
> cleaner than PHP.
>
> If I'm missing something please let me know.
>
> Regards
>
> --
> View this message in context:
> http://www.nabble.com/Is-this-a-serious-flaw-or-just-my-mistake--tp24702520p24818944.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/20090817/4e4bad82/attachment.html 


More information about the Mono-aspnet-list mailing list