mdsrv icon indicating copy to clipboard operation
mdsrv copied to clipboard

Update deployment documentation

Open tonyyzy opened this issue 5 years ago • 0 comments

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 via brew https://tecadmin.net/install-apache-macos-homebrew/ refer to the first bit for installation

  • Under a conda environment, use pip to install mod_wsgi then mod_wsgi-express install-module. This command will print three lines to the terminal, copy the three lines to the end of the httpd.conf file, for apache to load mod_wsgi module. The location depends on where you installed httpd, 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 directory
      DocumentRoot /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
         Order deny,allow
         Allow from all
      
      with
         Require all granted
      

tonyyzy avatar Aug 02 '19 16:08 tonyyzy