fastcgi-mono-server4 debugging on nginx, is it possible?
I've just ran into the same problem myself and was able to fix it :)
The MONO_OPTIONS
environment variable can hold additional parameters that are passed to the mono executable. So if you do:
export MONO_OPTIONS="--debug"fastcgi-mono-server-4 /applications="/:/srv/www/htdocs/mywebapp" /socket=tcp:127.0.0.1:9000
You should get debug information (linenumber and files) upon error, provided of course you also deployed the *.mdb files which hold the debug information.
I personally use a modified verison of the init script found here which is as follows:
#!/bin/sh### BEGIN INIT INFO# Provides: monoserve.sh# Required-Start: $local_fs $syslog $remote_fs# Required-Stop: $local_fs $syslog $remote_fs# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start fastcgi mono server with hosts### END INIT INFOsource /etc/mono-addon-envNAME=monoserverDESC=monoserverMONO_OPTIONS="--debug"MONOSERVER=$(which fastcgi-mono-server4)MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server4.exe | grep -v grep | awk '{print $2}')WEBAPPS="/:/srv/www/htdocs/mywebapp/"case "$1" in start) if [ -z "${MONOSERVER_PID}" ]; then echo "starting mono server" ${MONOSERVER} /applications=${WEBAPPS} /socket=tcp:127.0.0.1:9000 & echo "mono server started" else echo ${WEBAPPS} echo "mono server is running" fi ;; stop) if [ -n "${MONOSERVER_PID}" ]; then kill ${MONOSERVER_PID} echo "mono server stopped" else echo "mono server is not running" fi ;;esacexit 0
But PAY ATTENTION: In case you use that init script to start up the fastcgi daemon, DO NOT USE any init tools like "service monoserve start" (RHEL/CentOS) or "rcMonoserve start". For me this will not work, I suspect the init system will spawn another process with different environment variables. To be safe, only call the script directly, i.e. /etc/init.d/monoserve startand put in in /etc/rc.local or such.