And indeed, throwing in a "PythonInterpreter site" in my port 80
VirtualHost, & a PythonInterpreter testsite in my port 8080
VirtualHost solved all my problems.  You guys are the best!

On May 21, 5:54 pm, Jason <[EMAIL PROTECTED]> wrote:
> Awesome!  Thanks for all the advice, guys.  Will try the
> PythonInterpreter trick & get back to you.
>
> Just FYI, I'd deliberately ignored that part of the documentation
> since it specifies:
>
> "If you need to put two Django installations within the same
> VirtualHost, you’ll need to take a special precaution to ensure
> mod_python’s cache doesn’t mess things up. Use the PythonInterpreter
> directive to give different <Location> directives separate
> interpreters"
>
> ...and my two Django installations are very much in different
> VirtualHosts.  So maybe the docs could use a bit of revision there...?
>
> Also, I'd very much like to try the mod_wsgi stuff, so if anyone has a
> good pointer to docs/tutorials regarding that, I'd appreciate.  Though
> I suspect I'll have *something* googled w/in minutes of pressing
> "send" here, so no worries...
>
> Thanks again!
>
> On May 21, 4:52 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
> > On May 22, 9:41 am, Jason <[EMAIL PROTECTED]> wrote:
>
> > > On May 21, 4:17 pm, Jashugan <[EMAIL PROTECTED]> wrote:
>
> > > > On May 21, 4:10 pm, Jason <[EMAIL PROTECTED]> wrote:
>
> > > > > Hey folks--
>
> > > > > I'm trying to set up a mirror instance of Django on our webserver,
> > > > > having grown tired of bringing our whole site down every time I'm
> > > > > debugging new code.
>
> > > > Why aren't you debugging on your local machine?
>
> > > a) thought it would be safer, environment-wise, to actually test on
> > > the same machine, if possible, & b) don't really have a local machine
> > > to test on.  Could set up something on my Mac, but that would be
> > > pretty radically different.  Have an Ubuntu-converted PC, but it's
> > > also pretty janky, & setting it up to exactly mirror our remote server
> > > would be a daunting proposition.  And basically, I'd just rather do it
> > > this way if I could.
>
> > > > > I've got an Apache VirtualHost set up on port 8080 that more or less
> > > > > mirrors our website.   And I've installed a separate instance of
> > > > > Django to work with it.
>
> > > > Are you listening on both ports? Check httpd.conf and make sure it has
> > > > something like this:
>
> > > > Listen 80
> > > > Listen 8080
>
> > > Oh yeah, that's all taken care of.  The "test site" is working fine on
> > > port 8080, separate from the regular port 80 site.  My problem is that
> > > if I change the Django settings exclusively on the port 8080
> > > VirtualHost (as per my last post), it also changes my main sites
> > > settings & throws me into the empty new Django install.  Hope that's
> > > clear...?
>
> > In mod_python, a single Python interpreter instance is used for a
> > virtual host. This doesn't take into consideration the port number. As
> > such, you would be sharing the same Python interpreter for all Django
> > instances on the same virtual host.
>
> > To avoid this, use the PythonInterpreter directive from mod_python to
> > designate that each instance should run in a separate interpreter.
>
> > Better still perhaps, use mod_wsgi. Run your main live Django instance
> > in embedded mode (like with mod_python), but delegate your test
> > instance to a separate process(es) using mod_wsgi daemon mode.
>
> > This has the benefit that they do not run in the same process and thus
> > will not interfere with each other. More importantly, mod_wsgi 2.0
> > daemon mode will recycle the daemon processes and reload your
> > application, without having to restart the whole of Apache, by simply
> > touching (modifying time stamp) the WSGI script file which is the
> > entry point for your application.
>
> > Thus you achieve your aim of using same machine setup, but of being
> > able to restart Django instance without restarting whole of Apache.
>
> > Graham
--~--~---------~--~----~------------~-------~--~----~
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