Howdy!
> I am newbie for the tg2 or pylons,and I have developed a simple app
> use tg2, I want to use the nginx + fastcgi to deploy the app,
> so I searched the tg2 wiki and pylons site,but I found only one
> article that describes how to run pylons with nginx proxy server ,I
> just want to know how to configure the nginx+fastcgi + tg2 or
> pylons,so anybody has the experience ?
I have a large-scale webapp written in TG2 deployed under Nginx
+FastCGI using the following configuration in Nginx:
location / {
set
$app_name site;
root /home/USER/app/site/src/TG2APP/
public;
include core/fcgi.conf;
fastcgi_param
SCRIPT_NAME "";
if ( -e $request_filename ) {
break;
}
fastcgi_pass unix:/home/USER/var/run/site.sock;
}
The above configuration allows for static resources to be served
directly by Nginx.
My .ini file for the app looks like: (making sure to install the Flup
package)
[server:main]
use = egg:PasteScript#flup_fcgi_thread
socket = /home/USER/var/run/site.sock
umask = 0
> and another question is which one is better between nginx as proxy
> server and nginx + fastcgi?
FastCGI will be faster than using an HTTP proxy, where the requests is
encoded and decoded at least twice. The fastest would be a WSGI
deployment; both Nginx and Apache (and possibly others) support WSGI
natively through extensions, though Nginx's WSGI capabilities should
be carefully considered; long requests to the webapp will potentially
block the entire web server due to Nginx's design.
— Alice.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---