[Mono-list] mod_mono 1 in FC2 not working on Apache 2.0.49
Igor Georgiev
gory@alphasoft-bg.com
Tue, 13 Jul 2004 10:46:32 +0300
i have a similar problems with mod_mono & apache 2.50
after digging the logs my conclusion is :
mod-mono-server.exe dont create socket when started from apache
---- from httpd.conf
MonoUnixSocket /tmp/mono/mod_mono_server
MonoRunXSP True
MonoExecutablePath /usr/local/mono/bin/mono
MonoPath /usr/local/mono/bin
MonoServerPath /usr/local/mono/bin/mod-mono-server.exe
MonoWapiDir /tmp/mono
this is not a permission problem because owner of /tmp/mono is nobody:nobody
(my apache account)
so i solve this problem with manual starting mod-mono-server.exe
--- here is the script
#!/usr/bin/bash
#----------------------------------------------------------------
# avoid a lot of errors if using odbc
export ODBCINI=/etc/odbc.ini
#----------------------------------------------------------------
ROOT=/tmp/mono
MONO=/usr/local/mono/bin/mono
SERVER=/usr/local/mono/bin/mod-mono-server.exe
APPLICATIONS='ur app path here'
SOCKET=/tmp/mono/mod_mono_server
#----------------------------------------------------------------
case "$1" in
'start')
$MONO $SERVER --root $ROOT --applications $APPLICATIONS --filename
$SOCKET --nonstop &
FIXED=0
while [ $FIXED = 0 ];do
sleep 1
echo "Waiting for $SOCKET to be created"
if [ -S $SOCKET ];then
echo "Change the owner of $SOCKET"
chown nobody:nobody $SOCKET
FIXED=1
fi
done
;;
'stop')
PROCESS=`ps -ef | grep 'mod\-mono\-server.exe'`
#echo "$PROCESS"
for PID in `echo "$PROCESS" | awk '{print $2}'`;do
echo "Killing $PID"
kill $PID
done
if [ -S $SOCKET ];then
rm $SOCKET
fi;;
*)
echo "usage $0 start|stop;;
esac
#ls -lh $SOCKET
#----------------------------------------------------------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.718 / Virus Database: 474 - Release Date: 09.07.2004