From: Stephen Finucane Date: Mon, 1 May 2017 23:47:51 +0000 (+0100) Subject: lib: Update uWSGI, nginx config files X-Git-Tag: v2.0.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=150f6150b813b5cc45eb2e7ebb719a216329e160;p=thirdparty%2Fpatchwork.git 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 --- diff --git a/lib/nginx/patchwork.conf b/lib/nginx/patchwork.conf index 1e69d1a9..893589bd 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 04a9837b..d67837cb 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