As of recently, I have invested some time preparing a correct setup for mod_mono that involves a running mod-mono-server.exe process, using a Unix socket for communication between the mono server and the apache module. This way I prepared an init.d script for mod-mono-server, that could be distributed with the xsp package, along with the current init.d script for xsp.exe. In addition, I crafted the corresponding conf.d file and tweaked apache's mod_mono.conf a little bit. See attachments below. It works "out of the box" on my system; examples show up by default on <http://localhost/mono/>. Please let me know if you need any other info. Thanks.
Created attachment 43768 [details] mod-mono-server.init.d
Created attachment 43769 [details] mod-mono-server.conf.d
Created attachment 43770 [details] 70_mod_mono.conf Modified version of the file that comes with www-apache/mod_mono
I've added initd/confd scripts to dev-dotnet/xsp-1.0.5-r1 as it's masked and though no (yet enother) new masked ebuild required. leonardop: I adapted your mod_mono.conf changes a bit to the new configuration style of all (good) new apache module ebuilds. init script (and config file) just had a very little cleanup. latexer: please review.
erm... so much for out-of-the-box... hmm.... when accessing my http://localhost/mono, I get: System.InvalidOperationException: Process has not been started. in <0x0003b> System.Diagnostics.Process:get_ExitCode () in <0x00050> (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ExitCode () in <0x002bd> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters,string[]) in <0x0044a> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[]) in <0x00050> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit) in <0x00171> System.Web.Compilation.CachingCompiler:Compile (System.Web.Compilation.BaseCompiler) in <0x002ea> System.Web.Compilation.BaseCompiler:GetCompiledType () in <0x00251> System.Web.Compilation.AspGenerator:GetCompiledType () in <0x00070> System.Web.UI.ApplicationFileParser:GetCompiledApplicationType (string,System.Web.HttpContext) in <0x00047> System.Web.HttpApplicationFactory:CompileApp (System.Web.HttpContext) in <0x00032> System.Web.HttpApplicationFactory:InitializeFactory (System.Web.HttpContext) in <0x0007a> System.Web.HttpApplicationFactory:GetInstance (System.Web.HttpContext) in <0x0010a> System.Web.HttpRuntime:InternalExecuteRequest (System.Web.HttpWorkerRequest) however, mod-mono-server is started properly and /tmp/mod_mono_server socket exists as well. I suppose that this message was generated on mod-mono-server side, so my question is, *what* process could he mean then?
Hi, Thanks for looking into this, and committing the files. I've tested mod-mono-server with xsp-1.0.6 and mod_mono-1.0.6-r1, and everything worked (kinda) out-of-the-box. I had to hack the xsp ebuild so it actually installed the init.d and conf.d files, then ran '/etc/init.d/mod-mono-server start', then added "-D MONO -D MONO_DEMO" in /etc/conf.d/apache2, restarted apache, pointed my browser to http://localhost/mono/, and everything worked just fine. I'll attach the diff with the xsp ebuild.
Created attachment 53686 [details, diff] xsp-1.0.6.ebuild-install_mod-mono-server_files.patch
Please apply xsp-1.0.6.ebuild-install_mod-mono-server_files.patch to xsp-1.0.6 and newer since in 70_mod_mono.conf there is directive 'MonoRunXSP false' by default and therefore it's impossible to run /etc/init.d/mod-mono-server when there is no such file :) However I think 'MonoRunXSP true' would be better for most users to have mod-mono-server running out-of-the-box.
In case you guys are busy, I'd like te fix this small issue so we can close this bug. Please let me know if it's okay to commit the following changes in xsp's ebuilds: - newexe ${FILESDIR}/mod-mono-server.initd + newexe ${FILESDIR}/mod-mono-server.initd mod-mono-server - newins ${FILESDIR}/mod-mono-server.confd + newins ${FILESDIR}/mod-mono-server.confd mod-mono-server As you can see, it's just a typo that prevents the init and conf files from actually getting installed.
Committed to CVS. Sorry it took so long to get to.
ayeeeee.... thx ;-)