mdsrv
mdsrv copied to clipboard
Update deployment documentation
Since I had to go through a few hurdles to setup mdsrv
with apache2
on my mac, I thought it would be useful to document the process and may contribute to a documentation update.
Setup on MacOS Mojave (10.14.6) with HomeBrew
and conda
on python3.6
(don't think 3.7 is supported yet? possibly due to async?)
-
It is hopeless to install
mod_wsgi
on apple's apache. Need to install apache/httpd viabrew
https://tecadmin.net/install-apache-macos-homebrew/ refer to the first bit for installation -
Under a
conda
environment, use pip to installmod_wsgi
thenmod_wsgi-express install-module
. This command will print three lines to the terminal, copy the three lines to the end of thehttpd.conf
file, for apache to load mod_wsgi module. The location depends on where you installedhttpd
, likely to be/usr/local/etc/httpd
-
Follow http://nglviewer.org/mdsrv/deployment.html to put the four files into the correct location (mdsrv.conf, mdsrv.html, mdsrv.wsgi, app.cfg).
-
The
mdsrv.conf
needs a bit modification before operational:- Add a new section that directs to the
/var/www/html
directoryDocumentRoot /var/www/html <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
- For apache 2.4, the original apache.conf file's permission part needs to be replaces
Replace
withOrder deny,allow Allow from all
Require all granted
- Add a new section that directs to the