diff options
author | Stephen Finucane <stephen.finucane@intel.com> | 2016-02-02 23:44:34 +0000 |
---|---|---|
committer | Stephen Finucane <stephen.finucane@intel.com> | 2016-02-14 16:24:08 +0000 |
commit | ab05e55a08ded11c6e5b58dc91ba33087d9a2278 (patch) | |
tree | 385394f3a73dbc60ba2ce8b521d93e0bf2352a6a /lib/nginx/patchwork.conf | |
parent | 2ad82b755b245e2297856cdbbcf1a3a31025682b (diff) | |
download | patchwork-ab05e55a08ded11c6e5b58dc91ba33087d9a2278.tar patchwork-ab05e55a08ded11c6e5b58dc91ba33087d9a2278.tar.gz |
lib: Add nginx and uWSGI configuration files
nginx and uWSGI are a well-known option for deploying Django
applications today - might as well embrace them.
Conversely, the mod_python variable and fastcgi service are both
deprecated and should not be used. Remove these.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/nginx/patchwork.conf')
-rw-r--r-- | lib/nginx/patchwork.conf | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/nginx/patchwork.conf b/lib/nginx/patchwork.conf new file mode 100644 index 0000000..5479496 --- /dev/null +++ b/lib/nginx/patchwork.conf @@ -0,0 +1,41 @@ +user www-data; +worker_processes 4; +pid /var/run/nginx.pid; + +events { + worker_connections 768; +} + +http { + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + gzip on; + gzip_proxied any; + gzip_types text/plain text/css text/javascript application/x-javascript + text/xml application/xml image/svg+xml + application/vnd.ms-fontobject application/x-font-ttf font/opentype; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + server { + location = favicon.ico { access_log off; log_not_found off; } + + location /static { + alias /var/www/patchwork; + expires 3h; + } + + location / { + include uwsgi_params; + uwsgi_pass unix:/run/uwsgi/patchwork.sock; + uwsgi_modifier1 30; + } + } +} |