From 1b0333fdd5175d6a45d1929218e0aac3db884139 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 23 Feb 2019 13:27:33 +0100 Subject: Improve the deployment configuration --- config/apache2.config | 6 ++++++ config/nginx.config | 14 ++++++++++++++ config/uwsgi.config | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 config/apache2.config create mode 100644 config/nginx.config create mode 100644 config/uwsgi.config (limited to 'config') diff --git a/config/apache2.config b/config/apache2.config new file mode 100644 index 0000000..2489609 --- /dev/null +++ b/config/apache2.config @@ -0,0 +1,6 @@ +Listen 80 + + DocumentRoot "/var/www/mat2-web/" + + ProxyPass / unix:/var/www/mat2-web/mat2-web.sock|uwsgi://localhost/ + diff --git a/config/nginx.config b/config/nginx.config new file mode 100644 index 0000000..b519ee7 --- /dev/null +++ b/config/nginx.config @@ -0,0 +1,14 @@ +server { + server_name _; + listen 80 default_server; + listen [::]:80 default_server; + client_max_body_size 20M; + + root /var/www/mat2-web; + + location / { try_files $uri @yourapplication; } + location @yourapplication { + include uwsgi_params; + uwsgi_pass unix:/var/www/mat2-web/mat2-web.sock; + } +} diff --git a/config/uwsgi.config b/config/uwsgi.config new file mode 100644 index 0000000..7108d33 --- /dev/null +++ b/config/uwsgi.config @@ -0,0 +1,19 @@ +[uwsgi] +module=main +chdir = /var/www/mat2-web/ +callable = app +wsgi-file = main.py +master = true +workers = 1 + +uid = www-data +gid = www-data + +# kill stalled processes +harakiri = 30 +die-on-term = true + +socket = mat2-web.sock +chmod-socket = 774 +plugins = python3 + -- cgit v1.3