From 560a4895d8de2e0e7d6be0e961dc99e4ba31810a Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Tue, 19 Apr 2011 11:15:01 -0400 Subject: [PATCH] Fixed --pid option in deploy docs. Thanks to Miguel Araujo for spotting it. Fixes #198 --- doc/htdocs/deploy.html | 12 +++++++----- doc/site/deploy.rst | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/htdocs/deploy.html b/doc/htdocs/deploy.html index 6b345fcf..7cfe18ab 100644 --- a/doc/htdocs/deploy.html +++ b/doc/htdocs/deploy.html @@ -70,14 +70,16 @@ http { root /path/to/app/current/public; location / { + # checks for static file, if not found proxy to app + try_files $uri @proxy_to_app; + } + + location @proxy_to_app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; - if (!-f $request_filename) { - proxy_pass http://app_server; - break; - } + proxy_pass http://app_server; } error_page 500 502 503 504 /500.html; @@ -152,7 +154,7 @@ APP=main:application if [ -f $PID ]; then rm $PID fi cd $ROOT -exec $GUNICORN -c $ROOT/gunicorn.conf.py --pidfile=$PID $APP +exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP
diff --git a/doc/site/deploy.rst b/doc/site/deploy.rst index b95ef600..ba6e1e42 100644 --- a/doc/site/deploy.rst +++ b/doc/site/deploy.rst @@ -141,7 +141,7 @@ An `example service`_ definition:: if [ -f $PID ]; then rm $PID fi cd $ROOT - exec $GUNICORN -c $ROOT/gunicorn.conf.py --pidfile=$PID $APP + exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP Supervisor ++++++++++