Just be aware that by default mod_python assigns sub interpreters per
name based virtual host and doesn't take into consideration the
listener port. Therefore, if having two listener ports on the same
host name, the same sub interpreter will be used for both, which means
that Django instances will not be separated and will not work
properly.

In mod_python you will need to use PythonInterpreter directive to
override name of sub interpreter in each VirtualHost for which only
difference is listener port.

Better still, use mod_wsgi instead as it is more sensible and by
default separates the applications by default as it delegates to sub
interpreters on the basis of combination of server name and port. The
only except being that 80/443 are merged into same sub interpreter as
they would generally be the same application.

Graham

On Nov 2, 1:00 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 1, 2008 at 9:03 AM, bluefireredsky <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Hello,
>
> > I have followed the link from django documentation on deploying an
> > application to apache2.
>
> >http://docs.djangoproject.com/en/dev/howto/deployment/modpython/
>
> > I have two applications, which I would like to run on two different
> > ports on the server. Basically one being an administrative website
> > (not the django inbuilt admin website) and the other the user front
> > end.
>
> > Currently I have the following on my ports.conf:
>
> > =======================
> > Listen 80
>
> > <IfModule mod_ssl.c>
> >    Listen 443
> > </IfModule>
> > =======================
>
> > My httpd.conf is as follows:
>
> > ========================
> > <Location "/">
> >    SetHandler python-program
> >    PythonHandler django.core.handlers.modpython
> >    SetEnv DJANGO_SETTINGS_MODULE mysitename.settings
> >    PythonOption django.root /mysitename
> >    PythonDebug On
> >    PythonPath "['/usr/local/'] + sys.path"
> > </Location>
> > <Location "/media">
> >    SetHandler None
> > </Location>
> > <LocationMatch "\.(jpg|gif|png|css|js)$">
> >    SetHandler None
> > </LocationMatch>
> > ========================
>
> > What changes should I do on these files to run my second django
> > application on a different port, say 8080, on the same apache server?
>
> This is really more an Apache question than a Django one.  First you'll need
> to add a Listen for the second port in your ports.conf, the doc for that is
> here:
>
> http://httpd.apache.org/docs/2.2/bind.html
>
> At the bottom of that page they point to the VirtualHost directive, which is
> the second thing you'll need to do.  You need to enclose your existing
> directives for the app on port 80 in a VirtualHost block for port 80, and
> create a second VirtualHost with directives for the new app that you want on
> the second port.
>
> Karen
--~--~---------~--~----~------------~-------~--~----~
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