Gotcha -

Assuming that you were able to start the service as in the instructions at
the end of that page (i.e.

django-fcgi.py --settings=myproject.settings --host 127.0.0.1 --port
8882 --daemon)
and that you didn't see any errors with that, the problem is likely in
the connection
between the Apache service built in to MacOS X server and your FastCGI process.

The instructions on that page indicate you should have something like
this in your /etc/httpd/httpd.conf file:

FastCgiExternalServer /Library/WebServer/Documents/django.fcgi -host
127.0.0.1:8882
        
<VirtualHost *:80>
    Servername django.loc
    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 ^(/myapp.*)$ /django.fcgi$1 [L] # your own application
    RewriteRule ^(/.*)$ /django.fcgi$1 [L] # the rest of django (only
if needed from the web root)
</VirtualHost>


Do you have this in place? Did you change this at all? If so, what do you
have there? Did you restart the Apache server after you modified the
configuration file?

-joe


On 4/30/07, Mark Phillips <[EMAIL PROTECTED]> wrote:
>
>
> Thank you, Joe, for the reply. I wasn't sure if there was anyone on
> the list who is familiar with osx server.
>
> I followed the instructions at <http://code.djangoproject.com/wiki/
> OsxFcgi> and the "updated" instructions linked from that page.
>
> I am trying to use Apache 1.3. I have Apache 2 on the server, but not
> running as I don't know enough to set it up with the Apple admin
> tools I use.
>
> Yes, when I start Django using "runserver" on the server I can access
> the admin pages as expected using the browser on the server.
>
> I think I am missing something in your comment "In the process of
> setting up anything else, you should be pointing your browser to that
> service and whatever port you defined (typically 80). ". Perhaps you
> can help me understand a bit more about this.
>
> Given the server is running, I move to another workstation and open
> the browser. Then I enter URL that is mapped to that server, e.g.
> dev.mophilly.com. The web server returns the main page. With that I
> want to open the Django admin pages to make things are working.
>
>   - Mark
>
> On Apr 30, 2007, at 10:39 AM, Joseph Heck wrote:
>
> > Hi Mark,
> >
> > Your question doesn't leave enough detail to really fill in an
> > answer. Which instructions did you use (the URL), and where is it
> > failing? If you've got Django set up with FCGI, you're probably
> > routing the requests through either the built-in Apache server or
> > something like Lighttpd or NGinx. Did you use either of those?
> >
> > When you run the development version of Django with its built in
> > server, pointing your browser to http://127.0.0.1:8000/ should do
> > the trick. In the process of setting up anything else, you should
> > be pointing your browser to that service and whatever port you
> > defined (typically 80).
> >
> > Can you shed any more light to let us help you?
> >
> > -joe
> >
> > On 4/30/07, Mark Phillips <[EMAIL PROTECTED] > wrote:
> > Hello from a newbie on this list. I assume I am asking a time worn
> > question but having scoured the web site and sifted through the
> > archives, I haven't found the answers the holes in my understanding
> > of how this works.
> >
> > I spent three hours yesterday setting up Django on Mac OS X 10.4.9
> > using fastcgi. I followed the instructions at the main site, and all
> > seemed to work along fine as far as it went. Django runs fine in
> > localhost and the web server is up and running.
> >
> > I don't see how to get an external browser to invoke the cgi.
> >
> > I saw the setup instructions that use MacPorts but I have a few
> > questions; it seems like a lot of effort just to get Apache2 running
> > and when done I will have a "non-standard" server.
> >
> > Mark Phillips
> >
> >
> > >
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to