[Mono-list] Does anyone have virtual hosts working?

Jaroslaw Kowalski jaak@zd.com.pl
Tue, 25 May 2004 21:08:56 +0200


I do have a setup like this:

ma.mydomain.tld
mono.mydomain.tld

are supported with the following configuration file:

httpd.conf:
=======================================
LoadModule mono_module /opt/mono/lib/mod_mono.so
MonoUnixSocket /tmp/mod_mono_server

<VirtualHost *:80>
    ServerAdmin jaak@mydomain.tld
    AddDefaultCharset Off
    DocumentRoot /home/mono/public_html/html
    ServerName mono.mydomain.tld
    ErrorLog /home/mono/public_html/log/error_log
    CustomLog /home/mono/public_html/log/access_log common
    DirectoryIndex index.html index.htm index.shtml index.html.var
default.aspx index.aspx
    Options Indexes FollowSymLinks MultiViews

    <Location />
        SetHandler mono
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin jaak@mydomain.tld
    AddDefaultCharset Off
    DocumentRoot /home/mono/ma/www
    ServerName ma.mydomain.tld
    ErrorLog /home/mono/public_html/log/ma_error_log
    CustomLog /home/mono/public_html/log/ma_access_log common
    DirectoryIndex index.html index.htm index.shtml index.html.var
default.aspx index.aspx
    Options Indexes FollowSymLinks MultiViews

    <Location />
        SetHandler mono
    </Location>
</VirtualHost>
=======================================

config.xml:
=======================================
<apps>
<web-application>
        <name>ma.mydomain.tld</name>
        <vhost>ma.mydomain.tld</vpath>
        <vpath>/</vpath>
        <path>/home/mono/ma/www</path>
</web-application>
<web-application>
        <name>mono.mydomain.tld</name>
        <vhost>mono.mydomain.tld</vpath>
        <vpath>/</vpath>
        <path>/home/mono/public_html/html</path>
</web-application>
</apps>
=======================================
I run mod-mono-server.exe manually with:

mod-mono-server --appconfigfile config.xml

Hope it helps.

Jarek

----- Original Message ----- 
From: "Andrew Arnott" <AndrewArnott@byu.edu>
To: <mono-list@lists.ximian.com>
Sent: Monday, May 24, 2004 10:55 PM
Subject: [Mono-list] Does anyone have virtual hosts working?


> Given the bugs I have run into trying to set up virtual hosts in Apache, I
> doubt that anyone could have accomplished it yet (without applying some
> patches that have not made it into CVS yet, anyway.)  If anyone has
> successfully set it up, will they PLEASE post the configuration files
> involved and patches used (if any)?
>
> I am trying to get one Apache server to server multiple URLs
(mfhd.byu.edu,
> gerontology.byu.edu, etc.) all through one IP address and one port number.
> All of these sites have ASPX pages.  Has anyone accomplished this type of
> setup?
>
> Or can the author(s) comment on this?
>
> Thanks,
> Andrew Arnott
>