Using Apache as a front end
Introduction
In order to use Apache as a front end for ParaViewWeb, we recommend that you use version 2.4.7 or later of Apache. This is because as of version 2.4.7 Apache has, out of the box, everything required for it to serve as a ParaViewWeb front end.
Once Apache is ready to run, you will need to configure it together with your chosen launcher (see Multi-User Setup for information) to manage visualization sessions.
Getting Apache
The easiest thing to do is just to install Apache from a package. On recent Ubuntu distributions, this can be done as follows:
$ sudo apt-get install apache2-dev apache2 libapr1-dev apache2-utils |
Configure Apache httpd for use with ParaViewWeb
Next we address the configuration of Apache for use with ParaViewWeb.
Create a proxy/mapping file
Choose a directory for the mapping file that the launcher and Apache use to communicate about sessions and port locations. Then create a group so that both components have access to the file. For the purpose of these instructions, assume the full path to the directory you have chosen is <MAPPING-FILE-DIR>
, assume that daemon
is the user who will run Apache, and assume that pvw-user
is the user who will run the launcher and you are logged in as this user. Then you would do the following:
$ sudo mkdir -p <MAPPING-FILE-DIR> |
Add a virtual host
Now add a virtual host to the Apache configuration.
In this case you should create a file in /etc/apache2/sites-available/
and make a symbolic link to it from /etc/apache2/sites-enabled/
. We’ll assume you named this file 001-pvw.conf
.
In either case, make sure to replace the ServerName
value (shown below as ${MY-SERVER-NAME}
) with the correct host name. Also make sure the DocumentRoot
value (shown below as ${MY-DOCUMENT-ROOT}
) makes sense for your particular deployment, we typically point it at the www
directory of the ParaView build or install tree. Additionally, be sure to change ${MAPPING-FILE-DIR}
to the real location where you have put the map file.
<VirtualHost *:80> |
Enable required modules
First of all, you will need to enable the modules that will be used by our ParaViewWeb virtual host.
$ sudo a2enmod vhost_alias |
Then enable the virtual host you created above and restart Apache
$ sudo a2ensite 001-pvw.conf |
If you run into problems with your new virtual host listening properly, you may need to disable the default virtual hosts file as follows:
$ sudo a2dissite 000-default.conf |