better setup-web2py-nginx-uwsgi-ubuntu.sh, thanks Bruno
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-24 12:43:18) stable
|
Version 2.0.9 (2012-09-24 12:44:38) stable
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ echo 'server {
|
|||||||
root /home/www-data/web2py/applications/;
|
root /home/www-data/web2py/applications/;
|
||||||
}
|
}
|
||||||
location / {
|
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;
|
include uwsgi_params;
|
||||||
uwsgi_param UWSGI_SCHEME $scheme;
|
uwsgi_param UWSGI_SCHEME $scheme;
|
||||||
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||||
@@ -36,7 +37,8 @@ server {
|
|||||||
ssl_certificate /etc/nginx/ssl/web2py.crt;
|
ssl_certificate /etc/nginx/ssl/web2py.crt;
|
||||||
ssl_certificate_key /etc/nginx/ssl/web2py.key;
|
ssl_certificate_key /etc/nginx/ssl/web2py.key;
|
||||||
location / {
|
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;
|
include uwsgi_params;
|
||||||
uwsgi_param UWSGI_SCHEME $scheme;
|
uwsgi_param UWSGI_SCHEME $scheme;
|
||||||
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
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
|
# Create configuration file /etc/uwsgi/apps-available/web2py.xml
|
||||||
echo '<uwsgi>
|
echo '<uwsgi>
|
||||||
<plugin>python</plugin>
|
<plugin>python</plugin>
|
||||||
<socket>127.0.0.1:9001</socket>
|
<socket>/run/uwsgi/app/web2py/web2py.socket</socket>
|
||||||
<pythonpath>/home/www-data/web2py/</pythonpath>
|
<pythonpath>/home/www-data/web2py/</pythonpath>
|
||||||
<app mountpoint="/">
|
<app mountpoint="/">
|
||||||
<script>wsgihandler</script>
|
<script>wsgihandler</script>
|
||||||
</app>
|
</app>
|
||||||
|
<master/>
|
||||||
|
<processes>4</processes>
|
||||||
|
<harakiri>60</harakiri>
|
||||||
|
<reload-mercy>8</reload-mercy>
|
||||||
|
<cpu-affinity>1</cpu-affinity>
|
||||||
|
<stats>/tmp/stats.socket</stats>
|
||||||
|
<max-requests>2000</max-requests>
|
||||||
|
<limit-as>512</limit-as>
|
||||||
|
<reload-on-as>256</reload-on-as>
|
||||||
|
<reload-on-rss>192</reload-on-rss>
|
||||||
|
<no-orphans/>
|
||||||
|
<vacuum/>
|
||||||
</uwsgi>' >/etc/uwsgi/apps-available/web2py.xml
|
</uwsgi>' >/etc/uwsgi/apps-available/web2py.xml
|
||||||
ln -s /etc/uwsgi/apps-available/web2py.xml /etc/uwsgi/apps-enabled/web2py.xml
|
ln -s /etc/uwsgi/apps-available/web2py.xml /etc/uwsgi/apps-enabled/web2py.xml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user