A few tips to get you along:
1. Have some process like supervisord run your TG app, here's an example
of a supervisord conf file set to run a tg2 program
[program:example]
environment=PATH=/home/tzirim/env/bin/
directory=/home/example/web/example
command=/home/example/env/bin/python /home/example/env/bin/paster serve
--reload prod.ini
user=example
autostart=true
autorestart=true
stopsignal=QUIT
stopasgroup=true
killasgroup=true
redirect_stderr=true
2. Set nginx to act as a reverse proxy . Here's an example of a conf file,
which also enforces that app be served through ssl
server {
listen 80;
server_name example.domainname.co;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name example.domainname.co;
auth_basic "Restricted";
auth_basic_user_file /home/example/.htpasswd;
ssl on;
ssl_certificate /etc/nginx/certs/domainname_combined.crt;
ssl_certificate_key /etc/nginx/certs/domain.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:12000;
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;
proxy_set_header X-Forwarded-Host $server_name;
}
}
On Thursday, March 20, 2014 5:48:10 PM UTC+2, betelgeuse wrote:
>
> Hello,
>
> Now I'm stuck with an ubuntu 12.04 server running nginx. How should I
> deploy my app on that server?
> I found (with lots of googling) out that I need to use uwsgi with nginx
> but TG documentation web site has no info about it.
> Any step by step tutorial for how to deploy TG 2.3 app with nginx and
> uwsgi?
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.