2011/7/16 Juan Antonio Ibáñez <[email protected]>:
> Hello!
>
>   I am trying to configure two apps behind same server but I'am
> finding following problem:
>
> Both apps are using same template folder, but not always the same.
> First executed app seems to set template folder for both apps instead
> using its own folder. If I run app1 first (calling one of its
> controller methods), app1 and app2 use app1 templates. If app2 runned
> first, both app1 and app2 use app2 templates. It is annoyinf for me
> and after some days testing configurations I wasn't be able to find a
> solution. My apache conf looks as:
>
> ------------------------
> WSGIPythonHome /usr/local/pythonenv/BASELINE
> # TODO: confirm that this line is appropriate for Daemon mode...
> WSGIPythonPath /usr/local/pythonenv/ceaf/lib/python2.4/site-packages

For daemon mode, use python-path option to WSGIDaemonProcess instead.

> # Allow apache to serve static content.
> # Your site is configured to mount at /ceaf/ (use --mount to change
> this)
>
> Alias /ceaf/images /usr/src/tg2env/ceaf/ceaf/public/images
> Alias /ceaf/css /usr/src/tg2env/ceaf/ceaf/public/css
> Alias /ceaf/javascript /usr/src/tg2env/ceaf/ceaf/public/javascript
>
> # Choose deamon mode with 10 threads and 3 processes.
> # For small to medium website.
> WSGIApplicationGroup %{GLOBAL}

You are using a single daemon process but forcing both applications to
run in same interpreter. For TurboGears this likely isn't going to
work.

Use two daemon process groups and delegate each application to different one.

> WSGIDaemonProcess ceaf threads=10 processes=3
> WSGIProcessGroup ceaf
> WSGIScriptAlias /ceafv1 /usr/src/tg2env/ceaf/apache/ceaf.wsgi
> WSGIScriptAlias /ceafv2 /usr/src/tg2env/ceafv2/apache/ceaf.wsgi

WSGIDaemonProcess ceafv1 threads=10 processes=3
WSGIDaemonProcess ceafv2 threads=10 processes=3

WSGIScriptAlias /ceafv1 /usr/src/tg2env/ceaf/apache/ceaf.wsgi

<Location /ceafv1>
WSGIProcessGroup ceafv1
WSGIApplicationGroup %{GLOBAL}
</Location>

WSGIScriptAlias /ceafv2 /usr/src/tg2env/ceafv2/apache/ceaf.wsgi

<Location /ceafv2>
WSGIProcessGroup ceafv2
WSGIApplicationGroup %{GLOBAL}
</Location>

Graham

> WSGISocketPrefix /var/run/wsgi
> ------------------------
>
> Any idea where the problem could be?
>
> Regards
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" 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/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to