Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Multiple Turbogears apps mod_wsgi
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Juan Antonio Ibáñez  
View profile  
 More options Jul 16 2011, 4:54 am
From: Juan Antonio Ibáñez <juanito1...@gmail.com>
Date: Sat, 16 Jul 2011 01:54:55 -0700 (PDT)
Local: Sat, Jul 16 2011 4:54 am
Subject: Multiple Turbogears apps mod_wsgi
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

# 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}
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
WSGISocketPrefix /var/run/wsgi
------------------------

Any idea where the problem could be?

Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Dumpleton  
View profile  
 More options Jul 16 2011, 6:42 am
From: Graham Dumpleton <graham.dumple...@gmail.com>
Date: Sat, 16 Jul 2011 03:42:48 -0700
Local: Sat, Jul 16 2011 6:42 am
Subject: Re: [modwsgi] Multiple Turbogears apps mod_wsgi
2011/7/16 Juan Antonio Ibáñez <juanito1...@gmail.com>:

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Antonio Ibáñez  
View profile  
 More options Jul 16 2011, 7:33 am
From: Juan Antonio Ibáñez <juanito1...@gmail.com>
Date: Sat, 16 Jul 2011 04:33:45 -0700 (PDT)
Local: Sat, Jul 16 2011 7:33 am
Subject: Re: Multiple Turbogears apps mod_wsgi
Do you know if possible to set up / as one of two apps?

Trying to add following config seems not to work well:

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

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

On Jul 16, 12:42 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Dumpleton  
View profile  
 More options Jul 19 2011, 12:17 am
From: Graham Dumpleton <graham.dumple...@gmail.com>
Date: Tue, 19 Jul 2011 14:17:34 +1000
Local: Tues, Jul 19 2011 12:17 am
Subject: Re: [modwsgi] Re: Multiple Turbogears apps mod_wsgi
Sorry for delay in replying, work sucking up all my free time.

2011/7/16 Juan Antonio Ibáñez <juanito1...@gmail.com>:

> Do you know if possible to set up / as one of two apps?

Yes you can. You just need to make sure that WSGIScriptAlias for most
deeply nested path is first.

Would also look at qualifying things based on Directory of WSGI script
at that point rather than Location and URL. Using Location with '/' is
actually redundant as that is what VirtualHost level implies.
Directory is more specific anyway.

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

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

<Directory /usr/src/tg2env/ceaf/apache>
WSGIProcessGroup ceafv1
WSGIApplicationGroup %{GLOBAL}
</Directory>

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

<Directory /usr/src/tg2env/ceafv2/apache>
WSGIProcessGroup ceafv2
WSGIApplicationGroup %{GLOBAL}
</Directory>

Graham


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »