diff options
Diffstat (limited to 'conductor/examples/nginx')
-rw-r--r-- | conductor/examples/nginx/conductor-api.upstart.conf | 19 | ||||
-rw-r--r-- | conductor/examples/nginx/nginx.conf | 15 | ||||
-rw-r--r-- | conductor/examples/nginx/uwsgi_params | 13 |
3 files changed, 47 insertions, 0 deletions
diff --git a/conductor/examples/nginx/conductor-api.upstart.conf b/conductor/examples/nginx/conductor-api.upstart.conf new file mode 100644 index 0000000..fd8275f --- /dev/null +++ b/conductor/examples/nginx/conductor-api.upstart.conf @@ -0,0 +1,19 @@ +# cat /etc/init/conductor-uwsgi.conf +description "uWSGI server for conductor" + +start on runlevel [2345] # start on all runlevels. +stop on runlevel [!2345] # stop when shutting down. + +respawn + +script + /opt/app/conductor/bin/uwsgi \ + -s /tmp/uwsgi.sock \ + --chmod-socket=777 \ + --wsgi-file /etc/nginx/conductor.wsgi \ + --callable application \ + --set port=8091 \ + --venv /opt/app/conductor/ \ + --die-on-term \ + --logto /var/log/conductor/conductor-api.log +end scrip
\ No newline at end of file diff --git a/conductor/examples/nginx/nginx.conf b/conductor/examples/nginx/nginx.conf new file mode 100644 index 0000000..90f78c9 --- /dev/null +++ b/conductor/examples/nginx/nginx.conf @@ -0,0 +1,15 @@ +# This is an example nginx configuration file for using the +# conductor API through uWSGI. Include the "server" section +# within the broader "http" configuration. + +http { + server { + listen 8091; + server_name CONDUCTOR_API_FQDN; + + location / { + include uwsgi_params; + uwsgi_pass unix:/tmp/uwsgi.sock; + } + } +} diff --git a/conductor/examples/nginx/uwsgi_params b/conductor/examples/nginx/uwsgi_params new file mode 100644 index 0000000..c7727cd --- /dev/null +++ b/conductor/examples/nginx/uwsgi_params @@ -0,0 +1,13 @@ +uwsgi_param QUERY_STRING $query_string; +uwsgi_param REQUEST_METHOD $request_method; +uwsgi_param CONTENT_TYPE $content_type; +uwsgi_param CONTENT_LENGTH $content_length; +uwsgi_param REQUEST_URI $request_uri; +uwsgi_param PATH_INFO $document_uri; +uwsgi_param DOCUMENT_ROOT $document_root; +uwsgi_param SERVER_PROTOCOL $server_protocol; +uwsgi_param REMOTE_ADDR $remote_addr; +uwsgi_param REMOTE_PORT $remote_port; +uwsgi_param SERVER_ADDR $server_addr; +uwsgi_param SERVER_PORT $server_port; +uwsgi_param SERVER_NAME $server_name; |