I attempted invoking the django.fcgi script directly with a URL. E.g.
"http://dev.mysite.com/cgi-bin/django.fcgi". I tried this because I
am still having trouble using a normal url like "mydjango.mysite.com"
or similar. For example, "mydjango.mysite.com/admin" returns a 404
page and "mydjango.mysite.com" returns the default index.html page.
The good news is I got a python traceback, meaning the fastcgi is
working. The bad news is I got a python traceback. The reported error
was "string index out of range".
In httpd.conf I added:
FastCgiExternalServer /Library/WebServer/CGI-Executables/django.fcgi -
host 127.0.0.1:8882
<VirtualHost *:80>
ServerName mydjango.mysite.com
ErrorLog "/var/log/httpd/django-error.log"
CustomLog "/var/log/httpd/django-access.log" combined
DocumentRoot "/Library/WebServer/Documents"
RewriteEngine On
RewriteRule ^(/m/.*)$ $1 [L] # for custom media
RewriteRule ^(/media.*)$ $1 [L] # for admin media
RewriteRule ^(/.*\.)(jpg|gif|png|ico)$ $1$2 [L] # some other
media (mostly "accidentaly" in the root)
RewriteRule ^(/admin.*)$ /django.fcgi$1 [L] # admin application
RewriteRule ^(/mydjango.*)$ /django.fcgi$1 [L] # my Django
application
RewriteRule ^(/.*)$ /django.fcgi$1 [L] # the rest of django
(only if needed from the web root)
</VirtualHost>
I added an alias to hosts file.
127.0.0.1 localhost mydjango.mysite.com
255.255.255.255 broadcasthost
::1 localhost
Critique, links and suggestions warmly accepted.
- Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---