WebExp2 Experimenter's Manual - School of Informatics - University ...
WebExp2 Experimenter's Manual - School of Informatics - University ...
WebExp2 Experimenter's Manual - School of Informatics - University ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
7 Publishing an experiment on the web<br />
The previous section explained how to get an experiment running locally for testing. This section will explain<br />
how to get your <strong>WebExp2</strong> experiment running across the web. This involves setting up a web server, and<br />
publishing your experiment webpages.<br />
7.1 Making experiments available on the web<br />
To run your experiments across the web, you must make them available to users on the web. Ordinarily you<br />
could publish webpages on a web server which is managed for you, and indeed this is all you need to do for the<br />
pages containing the experiment client. However, the experiment clients need to contact your <strong>WebExp2</strong> server<br />
to retrieve and return information, and you have to run this experiment server yourself and make it available<br />
via a web server. The only way to do this is to run your own web server.<br />
7.2 Preparing for the Server<br />
This section describes how to prepare for publishing your experiments on the web. If you are setting up <strong>WebExp2</strong><br />
for the first time and just want to test your experiments locally, you can skip to section 3.1.<br />
7.2.1 Setting up a web server<br />
You will need a web server in order to provide your experiments to the world via your computer. This is a<br />
program such as Apache which runs on the computer and communicates with the world wide web via a port,<br />
which is a virtual ‘door’ to the files or services you want to make available. You can restrict what is visible by<br />
configuring your web server to supply particular files only to particular groups <strong>of</strong> people.<br />
When you have a web server such as Apache set up, you should place the <strong>WebExp2</strong> folder somewhere in the<br />
public html tree. Ensure your data directory is not accessible from the web, by for example creating an Apache<br />
.htaccess file with the command deny from all in it.<br />
7.2.2 Opening a port<br />
You will need to ensure you have a dedicated port open on the computer where you run the <strong>WebExp2</strong> server.<br />
This is the channel through which the server application can communicate with clients out on the web. Your<br />
web server will already use port 80 to supply HTML and other files to browsers via http; you will need to open<br />
a second port for <strong>WebExp2</strong>.<br />
<strong>WebExp2</strong> uses port 6789 by default, but any available port will do. If you use a different port, you will need to<br />
specify it when you set up experiments, and when you start the server. Note that port numbers 1024−49151 are<br />
‘registered’ and many are used for specific services; if you use one <strong>of</strong> these ports, a participant may have trouble<br />
if they happen to be using one <strong>of</strong> these services. For this reason we suggest you stick to the default <strong>of</strong> 6789,<br />
which is not currently associated with a particular service, or that you use a port in the range 49152 − 65535,<br />
which are unregistered.<br />
If you do not know how to open a port on your computer, or do not have the permissions, you should be able<br />
to make a request to your system administrator or support to open port 6789 (or another). You can explain<br />
that it is for running experiments via a client-server system.<br />
45