Trying to run an ASP.NET MVC application using Mono on Apache with FastCGI.

Posted by Arda Xi on Server Fault See other posts from Server Fault or by Arda Xi
Published on 2010-05-25T18:47:19Z Indexed on 2010/05/25 18:51 UTC
Read the original article Hit count: 1013

Filed under:
|
|
|

I have a hosting account with DreamHost, and I would like to use the same account to run ASP.NET applications. I have an application deployed in a subdomain, a .htaccess with a handler like this:

# Define the FastCGI Mono launcher as an Apache handler and let
# it manage this web-application (its files and subdirectories)
SetHandler monoWrapper
Action monoWrapper /home/arienh4/<domain>/cgi-bin/mono.fcgi virtual

My mono.fcgi is set up as such:

#!/bin/sh
#umask 0077
exec >>/home/arienh4/tmp/mono-fcgi.log
exec 2>>/home/arienh4/tmp/mono-fcgi.err

echo $(date +"[%F %T]") Starting fastcgi-mono-server2

cd /
chmod 0700 /home/arienh4/tmp/mono-fcgi.sock
echo $$>/home/arienh4/tmp/mono-fcgi.pid
# stdin is the socket handle
export PATH="/home/arienh4/mono/bin:$PATH"
export LD_LIBRARY_PATH="/home/arienh4/mono/lib:$LD_LIBRARY_PATH"
export TMP="/home/arienh4/tmp"
export MONO_SHARED_DIR="/home/arienh4/tmp"
exec /home/arienh4/mono/bin/mono /home/arienh4/mono/lib/mono/2.0/fastcgi-mono-server2.exe \
/logfile=/home/arienh4/logs/fastcgi-mono-web.log /loglevels=All \
/applications=/:/home/arienh4/<domain>

I took this from the Mono site for CGI, I'm not sure if I'm doing it correctly though. This code is resulting in this error:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I have no idea what's causing this. As far as I can see, Mono isn't even hit (no log files are created).

© Server Fault or respective owner

Related posts about apache

Related posts about ASP.NET