Web Platform for MRC Outreach Events: Difference between revisions

From MRC Centre for Outbreak Analysis and Modelling
Jump to navigation Jump to search
(Created page with "=== Install a Web Server === I like [http://www.aprelium.com Abyss X1]:- it's simple, very lightweight, and there are versions for all platforms. By all means, setup another...")
 
No edit summary
Line 1: Line 1:
=== Install a Web Server ===
== Introduction ==
 
This page describes steps to install web server software, and a website that supports the [[Barcode Epidemic]] and [[Herd Immunity]] tools we use in public events. Any web server and router will do for this, but below is how I set up our current kit, and the instructions should be fairly easily modified if you want to do this on different hardware or software.
 
== Install a Web Server ==


I like [http://www.aprelium.com Abyss X1]:- it's simple, very lightweight, and there are versions for all platforms. By all means, setup another web server if you prefer, but this one has served very well. Instructions below are for both Windows and Mac; if you use Linux, you'll probably figure out the very simple requirements. My instructions here are very simple - change locations to how you like if you're happy doing that.
I like [http://www.aprelium.com Abyss X1]:- it's simple, very lightweight, and there are versions for all platforms. By all means, setup another web server if you prefer, but this one has served very well. Instructions below are for both Windows and Mac; if you use Linux, you'll probably figure out the very simple requirements. My instructions here are very simple - change locations to how you like if you're happy doing that.


=== Installing Web Server Software ===
== Installing Web Server Software ==
[[File:abyss1.jpg|300px|right]]
[[File:abyss1.jpg|300px|right]]
[[File:abyss2.jpg|300px|right]]
[[File:abyss2.jpg|300px|right]]
[[File:abyss3.jpg|300px|right]]
[[File:abyss3.jpg|300px|right]]
[[File:epiweb.jpg|300px|right]]
[[File:epiweb.jpg|300px|right]]
==== Download Abyss ====
=== Download Abyss ===
Download from [http://aprelium.com/abyssws/download.php here] for your platform; Windows, Mac or Linux.
Download from [http://aprelium.com/abyssws/download.php here] for your platform; Windows, Mac or Linux.
* On '''Windows:''' - I installed to C:\Abyss, for simplicity. I tell it to install as a Windows service, and have it start up automatically.
* On '''Windows:''' - I installed to C:\Abyss, for simplicity. I tell it to install as a Windows service, and have it start up automatically.
* On '''Mac:''' - I mounted the installer, dragged the ''Abyss Web Server'' folder into my Applications folder, then tried to run the '''Abyss Web Server''' app from new folder I'd just dragged. It complained at me because it didn't come from the App Store, so I had to use '''Control+Click''' to run the app, and confirm I knew what I was doing. Also on running the Web Server, it asked me to confirm I wanted it to ''Activate ports below 1024'' - to which I said Yes, to make it run like a normal web server. If you want the web server to '''start automatically''' rather than having to start it yourself every time, then while the app is in focus, click on ''Server'' on the top menu, then ''Startup Configuration'' on the top menu bar, and choose the automatic startup option. If you want to stop it from being automatic, just manually run it again with a control+click, and you'll get the same menu back at the top.
* On '''Mac:''' - I mounted the installer, dragged the ''Abyss Web Server'' folder into my Applications folder, then tried to run the '''Abyss Web Server''' app from new folder I'd just dragged. It complained at me because it didn't come from the App Store, so I had to use '''Control+Click''' to run the app, and confirm I knew what I was doing. Also on running the Web Server, it asked me to confirm I wanted it to ''Activate ports below 1024'' - to which I said Yes, to make it run like a normal web server. If you want the web server to '''start automatically''' rather than having to start it yourself every time, then while the app is in focus, click on ''Server'' on the top menu, then ''Startup Configuration'' on the top menu bar, and choose the automatic startup option. If you want to stop it from being automatic, just manually run it again with a control+click, and you'll get the same menu back at the top.
 
=== Download PHP ===
==== Download PHP ====
Aprelium provide convenient downloads for Windows and Mac [http://aprelium.com/downloads/ here]. PHP 5 is fine.
Aprelium provide convenient downloads for Windows and Mac [http://aprelium.com/downloads/ here]. PHP 5 is fine.
* On '''Windows:''' - I installed into C:\Abyss\PHP5.
* On '''Windows:''' - I installed into C:\Abyss\PHP5.
* On '''Mac:''' - Again, I mounted the installer, and dragged the ''PHP5'' folder into Applications.
* On '''Mac:''' - Again, I mounted the installer, and dragged the ''PHP5'' folder into Applications.


==== First-time Setup ====
=== First-time Setup ===
* Open any browser and go to ''127.0.0.1:9999''. You should get the Abyss First-time Configuration page. Choose your Language (I'll be describing English!). Then choose a user and password, which is specific to managing Abyss. Make a note of it, although you won't need it much.
* Open any browser and go to ''127.0.0.1:9999''. You should get the Abyss First-time Configuration page. Choose your Language (I'll be describing English!). Then choose a user and password, which is specific to managing Abyss. Make a note of it, although you won't need it much.
* On '''Mac:''' - At this point for me, Safari got its knickers in a twist and I had to manually restart it. If it brings up a login screen, carry on, but if it seems to not do anything, then restart Safari and browse to ''127.0.0.1:9999'' again.  
* On '''Mac:''' - At this point for me, Safari got its knickers in a twist and I had to manually restart it. If it brings up a login screen, carry on, but if it seems to not do anything, then restart Safari and browse to ''127.0.0.1:9999'' again.  
* Your browser should now be asking you for the user/password you just chose. If you get it right, you'll get to the Web Server config page, and see a bunch of icons.
* Your browser should now be asking you for the user/password you just chose. If you get it right, you'll get to the Web Server config page, and see a bunch of icons.


==== Configure for PHP ====
=== Configure for PHP ===
* In the middle, you'll see "Default Host Running on Port 80." Click ''Configure'' next to it, and then ''Scripting Parameters''. Ensure ''Enable Scripts Execution'' is ticked, and ''Type'' is set to standard. Then under Interpreters, click ''Add'', set Interface to ''FastCGI (Local - Pipes)'', and for Interpreter, you need to locate a file "php-cgi" - where you installed PHP. For '''Windows''': something like ''C:\Abyss\PHP5\php-cgi.exe'', for '''Mac''': ''/Applications/PHP5/bin/php-cgi''.  
* In the middle, you'll see "Default Host Running on Port 80." Click ''Configure'' next to it, and then ''Scripting Parameters''. Ensure ''Enable Scripts Execution'' is ticked, and ''Type'' is set to standard. Then under Interpreters, click ''Add'', set Interface to ''FastCGI (Local - Pipes)'', and for Interpreter, you need to locate a file "php-cgi" - where you installed PHP. For '''Windows''': something like ''C:\Abyss\PHP5\php-cgi.exe'', for '''Mac''': ''/Applications/PHP5/bin/php-cgi''.  
* Then in ''Associated Extension'', click Add, and add the extension ''php''. Click Ok, and Ok again.
* Then in ''Associated Extension'', click Add, and add the extension ''php''. Click Ok, and Ok again.
Line 29: Line 32:
* And press the '''Restart''' button it is offering you. Wait a few seconds, and the config page will reappear. But you're all done now, so you can close it once it's done.
* And press the '''Restart''' button it is offering you. Wait a few seconds, and the config page will reappear. But you're all done now, so you can close it once it's done.


==== Setting up the Epi Website Platform ====
=== Setting up the Epi Website Platform ===


* First, clear out the default website Abyss came with. If you everything as I did above, then on '''Windows''' it'll be in ''C:\Abyss\htdocs''; on '''Mac:''' ''/Applications/Abyss Web Server/htdocs''.  
* First, clear out the default website Abyss came with. If you everything as I did above, then on '''Windows''' it'll be in ''C:\Abyss\htdocs''; on '''Mac:''' ''/Applications/Abyss Web Server/htdocs''.  
* So delete the files in that folder, and download the Epi Website (v1.1, 21/12/16) [https://mrcdata.dide.ic.ac.uk/resources/barcode_epi_web_1.1.zip here]. Extract that zip file into the relevant folder; you should see a file ''index.php'' and a folder ''epi'' within the ''htdocs' folder.  
* So delete the files in that folder, and download the Epi Website (v1.1, 21/12/16) [https://mrcdata.dide.ic.ac.uk/resources/barcode_epi_web_1.1.zip here]. Extract that zip file into the relevant folder; you should see a file ''index.php'' and a folder ''epi'' within the ''htdocs' folder.  
* And that's it. (Versions before 1.1 had a configuration step - but that's automatic now).
* And that's it. (Versions before 1.1 had a configuration step - but that's automatic now).

Revision as of 14:55, 9 January 2017

Introduction

This page describes steps to install web server software, and a website that supports the Barcode Epidemic and Herd Immunity tools we use in public events. Any web server and router will do for this, but below is how I set up our current kit, and the instructions should be fairly easily modified if you want to do this on different hardware or software.

Install a Web Server

I like Abyss X1:- it's simple, very lightweight, and there are versions for all platforms. By all means, setup another web server if you prefer, but this one has served very well. Instructions below are for both Windows and Mac; if you use Linux, you'll probably figure out the very simple requirements. My instructions here are very simple - change locations to how you like if you're happy doing that.

Installing Web Server Software

Abyss1.jpg
Abyss2.jpg
Abyss3.jpg
Epiweb.jpg

Download Abyss

Download from here for your platform; Windows, Mac or Linux.

  • On Windows: - I installed to C:\Abyss, for simplicity. I tell it to install as a Windows service, and have it start up automatically.
  • On Mac: - I mounted the installer, dragged the Abyss Web Server folder into my Applications folder, then tried to run the Abyss Web Server app from new folder I'd just dragged. It complained at me because it didn't come from the App Store, so I had to use Control+Click to run the app, and confirm I knew what I was doing. Also on running the Web Server, it asked me to confirm I wanted it to Activate ports below 1024 - to which I said Yes, to make it run like a normal web server. If you want the web server to start automatically rather than having to start it yourself every time, then while the app is in focus, click on Server on the top menu, then Startup Configuration on the top menu bar, and choose the automatic startup option. If you want to stop it from being automatic, just manually run it again with a control+click, and you'll get the same menu back at the top.

Download PHP

Aprelium provide convenient downloads for Windows and Mac here. PHP 5 is fine.

  • On Windows: - I installed into C:\Abyss\PHP5.
  • On Mac: - Again, I mounted the installer, and dragged the PHP5 folder into Applications.

First-time Setup

  • Open any browser and go to 127.0.0.1:9999. You should get the Abyss First-time Configuration page. Choose your Language (I'll be describing English!). Then choose a user and password, which is specific to managing Abyss. Make a note of it, although you won't need it much.
  • On Mac: - At this point for me, Safari got its knickers in a twist and I had to manually restart it. If it brings up a login screen, carry on, but if it seems to not do anything, then restart Safari and browse to 127.0.0.1:9999 again.
  • Your browser should now be asking you for the user/password you just chose. If you get it right, you'll get to the Web Server config page, and see a bunch of icons.

Configure for PHP

  • In the middle, you'll see "Default Host Running on Port 80." Click Configure next to it, and then Scripting Parameters. Ensure Enable Scripts Execution is ticked, and Type is set to standard. Then under Interpreters, click Add, set Interface to FastCGI (Local - Pipes), and for Interpreter, you need to locate a file "php-cgi" - where you installed PHP. For Windows: something like C:\Abyss\PHP5\php-cgi.exe, for Mac: /Applications/PHP5/bin/php-cgi.
  • Then in Associated Extension, click Add, and add the extension php. Click Ok, and Ok again.
  • You should be back at the icons page. Go to Index Files, and add index.php. Ok, and ok again.
  • And press the Restart button it is offering you. Wait a few seconds, and the config page will reappear. But you're all done now, so you can close it once it's done.

Setting up the Epi Website Platform

  • First, clear out the default website Abyss came with. If you everything as I did above, then on Windows it'll be in C:\Abyss\htdocs; on Mac: /Applications/Abyss Web Server/htdocs.
  • So delete the files in that folder, and download the Epi Website (v1.1, 21/12/16) here. Extract that zip file into the relevant folder; you should see a file index.php and a folder epi within the htdocs' folder.
  • And that's it. (Versions before 1.1 had a configuration step - but that's automatic now).