[Mono-list] mod_mono on SuSE 9 apache2

Chris Turchin chris@turchin.net
Tue, 11 May 2004 00:52:14 +0200


Hi,

I was having very similar problems and it was in fact permissions
related. Make sure that the apache/web user has permissions in whatever
directory your web application stuff is in. 

I did not notice this earlier because i was always starting the
mod-mono-server from hand up to now (now being v.0.9, which spawns the
mod-mono-server process itself), and the permissions were okay with the
other user context i was starting with. 

It is kinda tedious though, because it means when you recompile and or
modify anything, you need to chmod/chown anything that has changed (or
write a makefile that does this)...

Here is an excerpt from my httpd2.conf file and my remarks to the
permissions:

#begin new mod_mono module

LoadModule mono_module   modules/libmod_mono.so
MonoRunXSP True
MonoWapiDir /tmp
MonoUnixSocket /tmp/mod_mono_server
MonoServerPath /usr/bin/mod-mono-server.exe
MonoApplications "/test:/usr/share/doc/xsp/test,/blogx:/data/web/blogx"
	
Alias /test /usr/share/doc/xsp/test
<Directory /usr/share/doc/xsp/test>
	SetHandler mono
	Order allow,deny
	Allow from all
</Directory>
	
Alias /blogx /data/web/blogx
<Directory /data/web/blogx>
	SetHandler mono
	Order allow,deny
	Allow from all
</Directory>

#end new module

In this case, I needed to check everything in the test/ and blogx/
directory (and subdirs). Then it worked.

Of course, the mod-mono-server.exe and mono executable must also be
somewhere where apache/web can access them.

You might also try testing on your localhost interface. I seem to have
gotten better error reporting from apache via:

http://localhost/test/ 

than 

http://external.hostname.com/test/

example:

[Tue May 11 00:20:04 2004] [error] [client 127.0.0.1] Attempt to serve
directory: /data/web/blogx/

or

[Tue May 11 00:20:25 2004] [crit] [client 127.0.0.1] (13)Permission
denied: /data/web/blogx/SiteConfig/.htaccess pcfg_openfile: unable to
check htaccess file, ensure it is readable, referer:
http://localhost/blogx/Default.aspx

Whereas when testing on the external interface, I simply got no response
or just the source code streamed to the client?


Hope that helps.

Regards,

--chris


On Mon, 2004-05-10 at 23:32, Adam Jacob wrote:
> On Mon, 2004-05-10 at 13:18, Gonzalo Paniagua Javier wrote:
> 
> > > Does anybody have this working with the apache2 prefork mpm on SuSE 9? 
> > > Am I just being a moron? (Likely!)  
> > 
> > I just tried the same lines that you have (but i run apache2 as a
> > non-privileged user and on port 8080) and it worked fine. I can only
> > think of permissions problems...
> 
> What should the permissions be?
> 
> I can see the content, as it does show me the raw aspx pages. 
> mod-mono-server.exe is 755, as is /usr/bin/mono.  
> 
> ?
> 
> Adam