* Tom Evans <tevans...@googlemail.com> [130301 06:44]: > On Thu, Feb 28, 2013 at 6:23 PM, Tim Johnson <t...@akwebsoft.com> wrote: > > I'm having a hell of a time getting fastcgi to work on my mac, so <...> > > I didn't reply to your fastcgi posts yesterday, as you were attempting > to have everything spawned by the web server, which is not how I have > my fastcgi sites setup. If you are happy with running the web app > separately yourself, then this recipe will work: > > Apache httpd with mod_fastcgi: > > RewriteCond %{REQUEST_URI} !^/media > RewriteCond %{REQUEST_URI} !^/ > # repeat for any other directories you want httpd to serve > RewriteRule ^/(.*)$ /app.fcgi/$1 [QSA,L] > FastCGIExternalServer /path/to/your/htdocs/app.fcgi -socket > /path/to/your/webapp/run/app.socket > > Then simply ensure you have started your app: > > python project/manage.py runfcgi \ > socket=/path/to/your/webapp/run/app.socket \ > pidfile=/path/.../run/app.pid \ > errlog=... outlog=... \ > minspare=.. maxspare=... > > For absolute clarity, there is *no* real file named 'app.fcgi'. It > does not exist, it has no contents, it is merely a location in > urlspace - although you specify it as a filespace location! - that is > used to specify to fastcgi to take over the request. This is the > opposite of wsgi! > > Is there a reason you are not using wsgi by the way? This is the > preferred method of hosting python apps, we used fastcgi as we are not > only hosting python apps. Hi Tom :
I would like to try out your recipe this weekend and I hope that you might be around to answer further questions. But first I will answer yours: FYI: I have been a pythonist for 10 years and a web programmer for 17, but I have always worked in straight CGI, so this is new territory for me. At this time, I don't have a target for a django app, I am just in get-acquainted mode. If I test a django app on a remote server, it will be one hosted on hostmonster. Hostmonster does not provide mod_wsgi as I understand it. On down the road, I can foresee doing django projects on a non-shared server where I have full control over what I enable on apache and I am clear that in that case, wsgi will be the best choice. As for my mac :: unfortunately, I am kind of new to mac also, having used linux for the 12 years previous to getting this mac. Enabling fastcgi on my mac's apache had all kinds of problems, of which I don't at this time have time to elaborate on or to solve - although I am sure that is forthcoming. (some time) I hope that I can use your recipes as a talking point, and ask some further questions of you. Perhaps it is best that we 'reboot' under a different thread subject - as in 'fastcgi recipe' and the generated content might be of some help to others as well. Thank you for your reply. I'm going to owe you a beer when this is all said and one. regards -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.