[Mono-list] Apache user configuration with mono_module

Howard Cole howard.cole@selestial.com
Wed, 22 Dec 2004 17:25:15 +0000

Thanks for the help Shawn, you were right, but I didn't realise the 
lengths you had to go to!

A more in-depth solution can be found at the following link. 

A summary of the problem is that the user that the httpd daemon runs 
under needs access to the "/tmp/mod_mono_server" file. However, 
mod-mono-server needs to be running before you can change the 
permissions on this file! When the process stops, the file is deleted.

The solution is to start the mod-mono-server in the background and to 
keep it running. Then do a "chown apache /tmp/mod_mono_server". This can 
be accomplished on the command line as follows:
$ cd /var/www/html
$ mono /usr/bin/mod-mono-server.exe --root /var/www/html --applications 
"/test:/var/www/html" & > /dev/null
$ chown apache /tmp/mod_mono_server

The alias and root directory should match those in httpd.conf

The linked article shows how to do this as a service at startup.

I feel this should feature more prominently in the mono documentation 
otherwise many people that run apache as a different user are going to 
waste several days as I have, or switch back to windows!


Howard Cole wrote:

> Still get the same error (http 503). There must be some other file 
> somewhere that "apache" cannot find or execute? I have upgraded to 
> v1.0.5 but still have the same problem.
> Shawn Vose wrote:
>> I think you need to chmod it to 766