batok schrieb:
> I would like to serve the static content , that is, what's under
> public path via nginx.
> Can anybody show me an example of nginx.conf
> for doing this and the implications in config files in tg2 ?
Here's an example for a TG 1 application. Should be easy to adapt this
to TG 2. Just change the paths and URLs in the first two "location"
sections:
server {
listen :80;
server_name yourserver.com;
# serve static files directly with nginx
location ~ ^/static {
root /var/www/yourserver;
}
location = /favicon.ico {
root /var/www/yourserver/static/images;
}
# proxy to turbogears app
location / {
proxy_pass http://localhost:8081/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
}
And then link the static/public dir into "/var/www/yourserver".
HTH, Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---