From 3ebfa5da8abec2f5dd0d25cff8c0c8bd11e4ab6d Mon Sep 17 00:00:00 2001 From: smagnin Date: Sat, 22 Dec 2018 14:20:06 +0100 Subject: [PATCH] Add the Apache vhost configuration --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4eaa8c2..9e4ba79 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,6 @@ Then: # git clone https://0xacab.org/jvoisin/mat2-web.git # mkdir ./mat2-web/uploads/ # chown -R www-data:www-data ./mat2-web -# service uwsgi start -# service nginx start ``` Since uwsgi isn't fun to configure, feel free to slap this into your @@ -68,6 +66,25 @@ location @yourapplication { } ``` +If you prefer to use Apache: + +``` +apt install apache2 libapache2-mod-proxy-uwsgi +``` + +and add this to your `/etc/apache2/sites-enabled/mat2-web` in the `virtualhost` block: + +```Apache +ProxyPass / unix:/var/www/mat2-web/mat2-web.sock|uwsgi://localhost/ + +``` + +Now restart your webserver (nginx or apache) and uswgi +``` +systemctl restart uwsgi +systemctl restart nginx +``` + It should now be working. # Licenses