[Mono-aspnet-list] FastCgi Mono Server and Apache

loopedcode bdkid39 at hotmail.com
Sat Sep 19 14:54:47 EDT 2009


Thanks Kornel. 
I got it working after I reverted back to original settings with some
corrections in directory suggested in http://www.mono-project.com/CGI.

The problem was the path in applications configuration; I fixed it to:
/applications=/aspnet:/home/user1/public_html/aspnet

I had a directory called "aspnet" from my apache http root. I  incorrectly I
had my applications path set to:
/applications=/:/home/user1/public_html/aspnet. 

Anyway, for reference; here is my settings:
/home/user1/mono-fcgi file
#!/bin/sh
umask 0077
chmod 0700 /home/user1/tmp/mono-fcgi.sock
# stdin is the socket handle
exec env -i \
PATH="/usr/local/bin:$PATH" \
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" \
TMP="/home/user1/tmp" \
MONO_SHARED_DIR="/home/user1/tmp" \
/usr/local/bin/fastcgi-mono-server2 \
/applications=/aspnet:/home/user1/public_html/aspnet


/home/user1/public_html/cgi-bin/mono-cgi file:
#!/usr/local/bin/cgi-fcgi -f
-connect /home/user1/tmp/mono-fcgi.sock /home/user1/bin/mono-fcgi

/home/user1/public_html/aspnet/.htaccess
Action mono-cgi /cgi-bin/mono-cgi
SetHandler mono-cgi


Both mono-fcgi and mono-cgi are set at 755 permission.

Thanks.



Kornél Pál wrote:
> 
> Hi,
> 
> loopedcode wrote:
>  > /home/user1/bin/mono-fcgi &
> 
> There is no need to try to spawn an fcgi process every time. cgi-fcgi 
> takes care of that if you use it according to 
> http://www.mono-project.com/CGI
> 
>  >     # stdin is the socket handle
>  >     exec env \
>  >         /usr/local/bin/fastcgi-mono-server2 \
>  >         /socket=unix:$SOCKET \
>  >         /root=/home/user1/www/aspnet \
>  >         /applications=/:/home/user1/www/aspnet \
>  >         /logfile=/home/user1/bin/mono-fcgi.log \
>  >         /loglevels=All \
>  >         2>> /home/user1/bin/mono-fcgi.err
> 
> You have to use env -i and pass all your relevant environment variables 
> explicitly because mono-fastcgi-server will otherwise fall back to CGI 
> environment variables that most likely will cause you trouble.
> 
> Also note that "stdin is the socket handle" is not the case in your 
> case. If you let cgi-fcgi spawn your fcgi server when it's not available 
> then cgi-fcgi will take care of socket creation as well.
> 
> If you still have problems, please also send your Apache configuration.
> 
> Kornél
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> 
> 

-- 
View this message in context: http://www.nabble.com/FastCgi-Mono-Server-and-Apache-tp25420953p25524437.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list