Apache Configuration - hbz/to.science GitHub Wiki

The following section describes an example installation that puts regal-api on a api.localhost subdomain and regal-drupal on localhost.

regal-api

Follow the steps described in Install Regal-Api with
a modified BACKEND variable.

BACKEND=api.$SERVER

Proceed with the standard installation and come back when successfully finished.

During the standard installation two apache configs were generated for you. The ~/opt/local/conf/site.conf defines two http hosts – one for drupal (localhost) and one for regal-api (api.localhost). The ~/opt/local/conf/site.ssl.conf defines two https hosts using self-signed ssl certificates.

On a ubuntu system you can link the config to your /etc/apache2/sites-enabled directory and restart apache.

sudo ln -s ~/opt/local/regal/conf/site.conf /etc/apache2/sites-enabled
sudo service apache2 restart

or with ssl

sudo ln -s ~/opt/local/regal/conf/site.ssl.conf /etc/apache2/sites-enabled
sudo service apache2 restart

Configure static pages

In site.ssl.conf, the document root for your api has been set to /opt/toscience/var/html .
Create that directory and provide a file Identify.xml there. Provide any static content in a subfolder static/ there: stylesheets, locale etc.

If you use the ssl configuration you should define a “NameVirtualHost *:443” in your ports.conf (ubuntu)

<IfModule mod_ssl.c>
    NameVirtualHost *:443 
    Listen 443
</IfModule>

⚠️ **GitHub.com Fallback** ⚠️