From 150f6150b813b5cc45eb2e7ebb719a216329e160 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 2 May 2017 00:47:51 +0100 Subject: lib: Update uWSGI, nginx config files The nginx file was a replacement for '/etc/nginx/nginx.conf' instead of a "site" file, while the uWSGI file referenced the Python 2 plugin despite the sample deployment guide, which uses this, being Python 3-based. Correct both issues. Signed-off-by: Stephen Finucane --- lib/nginx/patchwork.conf | 46 +++++++++++----------------------------------- lib/uwsgi/patchwork.ini | 3 ++- 2 files changed, 13 insertions(+), 36 deletions(-) (limited to 'lib') diff --git a/lib/nginx/patchwork.conf b/lib/nginx/patchwork.conf index 1e69d1a..893589b 100644 --- a/lib/nginx/patchwork.conf +++ b/lib/nginx/patchwork.conf @@ -1,40 +1,16 @@ -user www-data; -worker_processes 4; -pid /var/run/nginx.pid; +server { + listen 80 default_server; + listen [::]:80 default_server; -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; + location = favicon.ico { access_log off; log_not_found off; } - 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 /static { + alias /var/www/patchwork; + expires 3h; + } - location / { - include uwsgi_params; - uwsgi_pass unix:/run/uwsgi/patchwork.sock; - } + location / { + include uwsgi_params; + uwsgi_pass unix:/run/uwsgi/patchwork.sock; } } diff --git a/lib/uwsgi/patchwork.ini b/lib/uwsgi/patchwork.ini index 04a9837..d67837c 100644 --- a/lib/uwsgi/patchwork.ini +++ b/lib/uwsgi/patchwork.ini @@ -1,6 +1,7 @@ [uwsgi] -plugins = python27 +# change this to python3 if running Patchwork under Python 2.7 +plugins = python3 project = patchwork base = /opt -- cgit v1.2.3