From b8b2eadf2eaa4ea7ad0dbf93328e8e55230bc719 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 24 Sep 2012 12:44:42 -0500 Subject: [PATCH] better setup-web2py-nginx-uwsgi-ubuntu.sh, thanks Bruno --- VERSION | 2 +- scripts/setup-web2py-nginx-uwsgi-ubuntu.sh | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index eb92fa8b..f3916d47 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-24 12:43:18) stable +Version 2.0.9 (2012-09-24 12:44:38) stable diff --git a/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh b/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh index f62a529b..264f9bc7 100644 --- a/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh +++ b/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh @@ -22,7 +22,8 @@ echo 'server { root /home/www-data/web2py/applications/; } location / { - uwsgi_pass 127.0.0.1:9001; + #uwsgi_pass 127.0.0.1:9001; + uwsgi_pass unix:///run/uwsgi/app/web2py/web2py.socket; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; @@ -36,7 +37,8 @@ server { ssl_certificate /etc/nginx/ssl/web2py.crt; ssl_certificate_key /etc/nginx/ssl/web2py.key; location / { - uwsgi_pass 127.0.0.1:9001; + #uwsgi_pass 127.0.0.1:9001; + uwsgi_pass unix:///run/uwsgi/app/web2py/web2py.socket; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; @@ -55,11 +57,23 @@ openssl x509 -req -days 1780 -in web2py.csr -signkey web2py.key -out web2py.crt # Create configuration file /etc/uwsgi/apps-available/web2py.xml echo ' python - 127.0.0.1:9001 + /run/uwsgi/app/web2py/web2py.socket /home/www-data/web2py/ + + 4 + 60 + 8 + 1 + /tmp/stats.socket + 2000 + 512 + 256 + 192 + + ' >/etc/uwsgi/apps-available/web2py.xml ln -s /etc/uwsgi/apps-available/web2py.xml /etc/uwsgi/apps-enabled/web2py.xml