On 1/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Eugene Lazutkin wrote:
> > I use Apache + FastCGI + MySQL. I think this is the easiest combination for
> > hosting providers. If they provide all 3, you can install the rest locally.
>
> Is it possible to take advantage of Apache+FastCGI+MySQL without
> reconfiguring Apache as per these instruction (assuming FastCGI is
> already installed):
> https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoFcgi
>
> If so, is there any documentation for this? Thanks. -Garett
You can use it without using external servers. If you have flup
installed, something like this as your .fcgi
#!/usr/bin/env python2.4
import sys
sys.path += ['/home/www/05/welvic.org.au/data']
from flup.server.fcgi_fork import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'welsite.settings'
WSGIServer(WSGIHandler()).run()
In the apache virtual host config, assuming fastcgi is enabled.
User wel
Group wel
<Location / >
Options +ExecCGI
AddHandler cgi-script .cgi .pl
AddHandler cgi-script .php .php3
AddHandler fastcgi-script .fcgi
</Location>
RewriteEngine On
RewriteRule ^/media/(.*)
/home/www/05/welvic.org.au/data/welsite/media/$1 [L]
RewriteRule ^/site_media/(.*)
/home/www/05/welvic.org.au/data/welsite/site_media/$1 [L]
RewriteRule ^(.*)$ /home/www/05/welvic.org.au/www/welsite.fcgi$1 [L]
This is, IMHO the easiest way to run it in a shared hosting
environment (i'll admit, we control the environment in this case, but
I dislike "special" setups where they can be avoided)
We also use suExec as the FastCGIWrapper, so it runs as the user (this
site isn't live yet btw :)).
-David
>
>