[Mono-list] Using xsp2 with mono
Jorge Bastos
mysql.jorge at decimal.pt
Fri Sep 14 18:25:03 EDT 2007
Understood and got it working,
But I have one doubt.
With this, in this specific virtualhost, I have 2 listening mono's, one for
1.0 profile and other for 2.0, but pointed to the virtualhost root dir.
I tried to configure 2 virtualhost's, and I have two process's, so I guess
I'll have one per each virtualhost configured for 2.0 profile? That the way
it is?
###### this is the global one
www-data 564 0.0 1.3 22032 7200 ? Ssl 23:11 0:00
/usr/local/bin/mono /usr/local/lib/mono/1.0/mod-mono-server.exe --filename
/tmp/mod_mono_server_global --nonstop --master
www-data 566 0.4 3.9 45920 20636 ? Ssl 23:11 0:01
/usr/local/bin/mono
###### this if for my first virtualhost
/usr/local/lib/mono/2.0/mod-mono-server2.exe --filename
/tmp/mod_mono_server_vhost1 --applications /:/home/alojamento/vhost1/
--nonstop
###### this if for my secund virtualhost
/usr/local/lib/mono/2.0/mod-mono-server2.exe --filename
/tmp/mod_mono_server_vhost2 --applications /:/home/alojamento/vhost2/
--nonstop
Another thing is, mod_mono still's giving error when
restarting/stop/starting apache:
[Fri Sep 14 23:20:35 2007] [warn] (22)Invalid argument: Failed to destroy
the '/tmp/mod_mono_dashboard_XXGLOBAL_1' shared memory dashboard
[Fri Sep 14 23:20:35 2007] [warn] (22)Invalid argument: Failed to destroy
the '/tmp/mod_mono_dashboard_vhost1' shared memory dashboard
[Fri Sep 14 23:20:35 2007] [warn] (22)Invalid argument: Failed to destroy
the '/tmp/mod_mono_dashboard_vhost2' shared memory dashboard
I belive this is a mod_mono bug?
Ah, I'm using apache 2.2.6, can be some compability bug for this new
version?
-----Original Message-----
From: Joshua Tauberer [mailto:jit at occams.info]
Sent: sexta-feira, 14 de Setembro de 2007 23:09
To: Jorge Bastos
Cc: Mono-list at lists.ximian.com
Subject: Re: [Mono-list] Using xsp2 with mono
The problem is probably that when using autohosting, directives in
VirtualHosts are (iirc) pretty much ignored. Obviously, you can't have
just one VirtualHost use ASP.NET 2.0 if more than one are all running
through one mod-mono-server process, which is (iirc) how autohosting
normally works.
If you put the MonoServerPath directive outside of vhosts (exactly the
opposite of part of my first suggestion!), I'd expect it to work (and
apply to all vhosts).
If you can't have it apply to all vhosts, for those vhosts that you want
2.0, inside the vhost config, you will have to turn off autohosting and
configure the application explicitly. At least, that's what I do for
each of my vhosts anyway. See the wiki page
(http://www.mono-project.com/Mod_mono) for more on that.
--
- Josh Tauberer
http://razor.occams.info
"Yields falsehood when preceded by its quotation! Yields
falsehood when preceded by its quotation!" Achilles to
Tortoise (in "Gödel, Escher, Bach" by Douglas Hofstadter)
Jorge Bastos wrote:
> Ok i don't see a way to get it working for a certein virtualhost.
> If I change /usr/local/bin/mod-mono-server from:
>
> #!/bin/sh
> exec /usr/local/bin/mono $MONO_OPTIONS
> "/usr/local/lib/mono/1.0/mod-mono-server
> .exe" "$@"
>
> To
>
> #!/bin/sh
> exec /usr/local/bin/mono $MONO_OPTIONS
> "/usr/local/lib/mono/2.0/mod-mono-server2
> .exe" "$@"
>
> And this way it works, but now I have all virtualhosts's using 2.0
profile.
>
> Should it work just with:
>
> MonoServerPath default /usr/local/bin/mod-mono-server2
> Or
> MonoServerPath /usr/local/bin/mod-mono-server2
>
> ?
>
> With this on the apache virtualhost conf, I get on error.log:
>
>
> [Fri Sep 14 22:39:09 2007] [error] Not running mod-mono-server.exe because
> no MonoApplications, MonoApplicationsConfigFile or
MonoApplicationConfigDir
> specified.
>
>
>
> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Jorge Bastos
> Sent: sexta-feira, 14 de Setembro de 2007 13:54
> To: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Using xsp2 with mono
>
> Yap Path is correct.
> It the test i'm doing works even with that error.
> But without that directive in the vhost conf, apache doesn't throw any
> error.
> With the code below, and this directive, the browser still's show me this:
>
> ---
> Compilation of Visual Basic code is not supported for v1.0/v1.1
assemblies,
> please use the v2.0 assemblies. - If this is a web application, use
> xsp2/mod_mono_server2 instead of xsp/mono_mono_server (see
> http://www.mono-project.com/Mod_mono#ASP.NET_2_apps_do_not_work). - If
this
> is a desktop application, use gmcs to compile your application instead of
> mcs.
> ---
>
>
> Test code:
>
>
> ---
> <%@ Page Language="vb" %>
> <script runat="server">
> Sub choose_image(Sender As Object, e As EventArgs)
> image1.Src = select1.Value
> End Sub
> </script>
>
> <html>
> <body>
>
> <form runat="server">
> <select id="select1" runat="server">
> <option value="smiley.gif">Smiley</option>
> <option value="angry.gif">Angry</option>
> <option
>
value="http://spe.atdmt.com/b/NMMRTYRBMPRO/FY07_FF_SCE_JointLaunch_120x240_d
> ownload_now_0503.gif">Stickman</option>
> </select>
> <input type="submit" runat="server" value="Display image"
> OnServerClick="choose_image">
> <br /><br />
> <img id="image1" src="smiley.gif" runat="server" width="32" height="32" />
> </form>
>
> </body>
> </html>
> ---
>
>
>
>
> -----Original Message-----
> From: Joshua Tauberer [mailto:jit at occams.info]
> Sent: sexta-feira, 14 de Setembro de 2007 12:44
> To: Jorge Bastos
> Cc: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Using xsp2 with mono
>
> Jorge Bastos wrote:
>> Guys, to configure a virtualhost to use mod-mono-server2, it's enougth:
>>
>> "MonoServerPath /usr/local/bin/mod-mono-server2" ?
>>
>> When i add this and restart apache i get:
>>
>> Restarting web server: apache2[Thu Sep 13 23:31:48 2007] [crit] (17)File
>> exists: Failed to create shared memory segment for backend 'XXGLOBAL'
>> [Thu Sep 13 23:31:58 2007] [crit] (17)File exists: Failed to create
>> shared memory segment for backend 'XXGLOBAL'
>
> The error message is (should be) unrelated to the MonoServerPath
> directive. (And provided the path is correct and you placed it in the
> VirtualHost block, that directive should be enough, yes.)
>
More information about the Mono-list
mailing list