File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,16 @@ <h2><a class="toc-backref" href="#contents">Nginx Configuration</a></h2>
70
70
root /path/to/app/current/public;
71
71
72
72
location / {
73
+ # checks for static file, if not found proxy to app
74
+ try_files $uri @proxy_to_app;
75
+ }
76
+
77
+ location @proxy_to_app {
73
78
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
74
79
proxy_set_header Host $http_host;
75
80
proxy_redirect off;
76
81
77
- if (!-f $request_filename) {
78
- proxy_pass http://app_server;
79
- break;
80
- }
82
+ proxy_pass http://app_server;
81
83
}
82
84
83
85
error_page 500 502 503 504 /500.html;
@@ -152,7 +154,7 @@ <h3><a class="toc-backref" href="#contents">Runit</a></h3>
152
154
if [ -f $PID ]; then rm $PID fi
153
155
154
156
cd $ROOT
155
- exec $GUNICORN -c $ROOT/gunicorn.conf.py --pidfile =$PID $APP
157
+ exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid =$PID $APP
156
158
</ pre >
157
159
</ div >
158
160
< div class ="section " id ="supervisor ">
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ An `example service`_ definition::
141
141
if [ -f $PID ]; then rm $PID fi
142
142
143
143
cd $ROOT
144
- exec $GUNICORN -c $ROOT/gunicorn.conf.py --pidfile =$PID $APP
144
+ exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid =$PID $APP
145
145
146
146
Supervisor
147
147
++++++++++
You can’t perform that action at this time.
0 commit comments