Ophidia Web Server Installation

Ophidia provides a smart web access to the list of the user’s sessions and the related operator commands.

Note

Before proceeding with the following steps, check that you have all the pre-requisites installed. In particular system developmente libraries and the web server. Additionally, the Ophidia server should be installed.

Ophidia Web access configuration

The Ophidia Server web access enables a “secure web access” to JSON files, published cubes and export NetCDF files with PHP-based authorization support. In case of installation from source code it can be activated by setting the following configuration option (see installation from sources):

--enable-webaccess

Then set the parameters listed in /var/www/html/ophidia/env.php appropriately (see Session Management for further details). The following configuration should be correct in case DNS name of the node which the server will be running on is localhost.

$oph_auth_location = '/usr/local/ophidia/oph-server';
$oph_web_server = 'http://localhost/ophidia';
$oph_web_server_location = '/var/www/html/ophidia';
$oph_ws_protocol = 'https';
$oph_ws_host = 'localhost';
$oph_ws_port = '11732';
$oph_notifier = 'framework';

Web server configuration

This section provides the additional steps required to setup the web access for the Apache HTTP Server. Although the procedure described is for CentOS, it can be easily adapted to other Linux distributions.

Install the required packages:

sudo yum install mod_ssl php-mysql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml

Create the ssl certificate:

cd /etc/httpd/conf
sudo mkdir ssl
sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out server.crt -keyout server.key

Configure the httpd server:

sudo vi httpd.conf

Add the following statement to VirtualHost 80 and VirtualHost 433:

RedirectMatch permanent /ophidia/sessions/(.*) /ophidia/sessions.php/$1

This configuration line has to be adapted according to subfolders set in your Ophidia web server root directory. For example, in case your web server is http://server.hostname/site then the line should be

RedirectMatch permanent /site/sessions/(.*) /site/sessions.php/$1

Configuration of virtual host 80 should be:

NameVirtualHost *:80
<VirtualHost *:80>
RedirectMatch permanent /ophidia/sessions/(.*) /ophidia/sessions.php/$1
</VirtualHost>

Alternately, if the web server allows htaccess, you can skip the above step and exploit the .htaccess file available in the web folder.

Restart the httpd service:

sudo service httpd restart

Test the web access

Open a browser and connect to http://server.hostname/ophidia setting appropriately server.hostname, i.e. the hostname of Ophidia Server node (you can set it to 127.0.0.1 for an all-in-one instance of Ophidia platform).

Digit your username and password and surf among your sessions!