Installation

Using the default installation options UBMoD will be accessible from the root URL of the server used (e.g. http://example.com/). If you would prefer to serve UBMoD from a subdirectory, follow the intructions provided below. If you have not yet installed UBMoD it is recommended to follow the default installation instructions before making these changes to your configuration.

* Note: requires UBMoD 2.0 (0.2.4 or higher)

Example

This example assumes that UBMoD is being installed into the subdirectory ubmod of an existing Apache VirtualHost for the host example.com.

http://example.com/ubmod

The example also assumes that UBMoD has been installed from the RPM package, if you have installed from source, change /usr/share/ubmod/html to the path of the portal html folder as is used in your Apache configuration.

Portal Configuration

Create a [portal] section in your configuration file (settings.ini) if it does not already exist and add the desired path.

[portal]
base_url = /ubmod
Apache Configuration

First, add an Alias directive for the UBMoD base directory.

Alias /ubmod /usr/share/ubmod/html

Next, add the base directory to the rewrite rules. (Note trailing slash.)

RewriteBase /ubmod/

Here is a complete VirtualHost example:

<VirtualHost example.com>

    DocumentRoot /var/www

    Alias /ubmod /usr/share/ubmod/html

    <Directory /usr/share/ubmod/html>
        RewriteEngine On
        RewriteBase /ubmod/
        RewriteRule ^api/rest/(.*)$ api/rest/index.php?path_info=$1 [L,QSA]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php?path_info=$1 [L,QSA]
    </Directory>
</VirtualHost>

Finally, reload the Apache configuration and point your browser to http://example.com/ubmod.