From 9d0406df26e687a601da36ee1856b3656bffcc3c Mon Sep 17 00:00:00 2001 From: Steffen Sauler Date: Fri, 15 Dec 2017 16:15:01 +0100 Subject: [PATCH] Added: Deploy in production using mod_wsgi --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index b854bf4..1e2f2c3 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,47 @@ optional arguments: The URL to connect to ``` +## Deploy in production using mod_wsgi + +Install Apache's mod-wsgi for Python3 + +```bash +sudo apt-get install libapache2-mod-wsgi-py3 +``` + +Caveat: If you already have mod-wsgi installed for Python2, it will be replaced! + +```bash +The following packages will be REMOVED: + libapache2-mod-wsgi +The following NEW packages will be installed: + libapache2-mod-wsgi-py3 +``` + +Configuration file `/etc/apache2/sites-available/misp-dashboard.conf` assumes that `misp-dashboard` is cloned into `var/www/misp-dashboard`. It runs as user `misp` in this example. Change the permissions to folder and files accordingly. + +``` + + ServerAdmin admin@misp.local + ServerName misp.local + + DocumentRoot /var/www/misp-dashboard + WSGIDaemonProcess misp-dashboard user=misp group=misp threads=5 python-home=/var/www/misp-dashboard/DASHENV + WSGIScriptAlias / /var/www/misp-dashboard/misp-dashboard.wsgi + + + WSGIProcessGroup misp-dashboard + WSGIApplicationGroup %{GLOBAL} + Require all granted + + + LogLevel info + ErrorLog /var/log/apache2/misp-dashboard.local_error.log + CustomLog /var/log/apache2/misp-dashboard.local_access.log combined + ServerSignature Off + +``` + # License Images and logos are handmade for: - rankingMISPOrg/