[Mono-list] Problems with runtime 1.1.4, xsp and mod_mono1.0.6 on SuSe 9.1

Joe Audette joe_audette@yahoo.com
Tue, 22 Feb 2005 20:42:18 -0800 (PST)


Jim,

It looks like you are using mojoportal, I am the
author, perhaps I can help.
I am running mojoportal on Suse 9.2 with the latest
svn code (and also on a box with Suse 9.1 an mono
1.0.5 release)  but your questions are more related to
apache configuration for mod_mono.

I recently learned how to do Virtual Hosts on apache
and am currently running 3 sites with mojoportal using
virtual hosts.

On Suse, you want to put your Virtual Host settings in
individual files per host in the
/etc/apache2/vhosts.d/ folder using a .conf extension.

Unless you have more than one ip address on the
machine it is less maintenance to leave out the ip
address in the settings. Here is my mojoportal.conf
file stored in /etc/apache2/vhosts.d/:

<VirtualHost *:80>
    ServerAdmin joe@mojoportal.com
    ServerName www.mojoportal.com

    DocumentRoot "/usr/local/web/mojosite"

    ErrorLog /var/log/apache2/mojoportal.com-error_log
    CustomLog
/var/log/apache2/mojoportal.com-access_log combined

    HostnameLookups Off
    UseCanonicalName On
    ServerSignature On

    # doubt if you need this but its in mine
    <IfModule mod_userdir.c>
	UserDir public_html
	Include /etc/apache2/mod_userdir.conf
    </IfModule>

    <Directory "/usr/local/web/mojosite">
    	SetHandler mono
	Options Indexes FollowSymLinks
	AllowOverride None
	Order allow,deny
	Allow from all
    
    </Directory>

</VirtualHost>

I have stripped out comments for brevity.

In addition, put this in your httpd.conf file:

LoadModule mono_module /usr/lib/apache2/mod_mono.so
MonoApplicationsConfigDir "/var/www/webapp"

and in the /var/www/webapp folder put files with a
.webapp extension for each host with contents like
this:

<apps>
      <web-application>
         <name>mojoportal</name>
         <vhost>www.mojoportal.com</vhost>
         <vport>80</vport>
         <vpath>/</vpath>
         <path>/usr/local/web/mojosite</path>
         <enabled>true</enabled>
      </web-application>
</apps>

you can of course choose different folders for where
you keep your files if you get the concept

The MonoApplicationsConfigDir directive is used
instead of the MononApplications directive you see in
the examples, then you can put as many .webapp files
in there to correspond with your  Virtual Hosts
running mono.

If you need more help, feel free to post in the forums
at http://www.mojoportal.com

Hope this helps,

Joe Audette


--- Jim Erwin <mono@eyekahn.com> wrote:

> Gonzalo,
> 
> Thanks for the reply. I have 4 apps running in
> production as virtual hosts.
> If I can't put the mono configuration directives in
> there, then where can I
> put them? The directives I'm using for each
> <VirtualHost> are:
> 
> Here is one of my vhosts as an example
> 
> NameVirtualHost 65.64.105.147
> 
> <VirtualHost 65.64.105.147>
> 
>     ServerAdmin mono@eyekahn.com
>     ServerName mojoportal.eyekahn.com
>     
>     <Directory /srv/www/MonoSites/mojoportal>
> 	Allow from all
>     </Directory>
> 
>     DirectoryIndex Default.aspx
>     DocumentRoot /srv/www/MonoSites/mojoportal
>     MonoPath /usr/lib/mono/gac:/usr/bin:/etc/mono
>     MonoExecutablePath /usr/bin/mono
>     MonoServerPath
> /usr/lib/mono/1.0/mod-mono-server.exe
>     MonoApplications /:/srv/www/MonoSites/mojoportal
>     MonoUnixSocket
> /srv/www/VirtualMonoSockets/monosocket_mojoportal
>     MonoWapiDir /srv/www/VirtualMonoWapi/mojoportal
>     AddHandler mono .aspx .ascx .config .cs .asmx
> .asax
> 
> </VirtualHost>
> 
> I have 4 sites/applications configured at the same
> IP and different host
> headers configured like this. How can I accomplish
> this without putting the
> Mono* configuration directives in the <VirtualHost>
> configuration section?
> 
> Regards,
> 
> JE
> 
> 
> -----Original Message-----
> From: mono-list-admin@lists.ximian.com
> [mailto:mono-list-admin@lists.ximian.com] On Behalf
> Of Gonzalo Paniagua
> Javier
> Sent: Tuesday, February 22, 2005 7:48 PM
> To: mono-list@lists.ximian.com
> Subject: Re: [Mono-list] Problems with runtime
> 1.1.4, xsp and mod_mono1.0.6
> on SuSe 9.1
> 
> There's a bug in the released mod_mono 1.0.6 that
> makes it not to spawn
> mod-mono-server if you put Mono* configuration
> directives inside
> <VirtualHost>.
> 
> As a workaround, put the directives out of any
> <virtualhost> and it will
> work again.
> 
> This issue will be fixed in next release of
> mod_mono.
> 
> -Gonzalo
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


=====
joe_audette@yahoo.com
http://www.joeaudette.com
http://www.mojoportal.com