Apache Module for Linux

From Lianjapedia
Revision as of 09:38, 25 August 2017 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

See Also

ISAPI Extension for IIS, Lianja Server Manager on Linux

Overview

If you want to integrate Lianja Cloud Server in with Apache you need to install and configure the Lianja Module for Apache.

This will provide both HTTP and HTTPS (SSL) access to your Lianja Apps and the whole Lianja APaaS with integrated Login, App Center and Logout.

To install and configure the Lianja Module for Apache perform the following steps depending on your Linux distribution.

Ubuntu, Debian and family

1. Copy the file mod_lianja.so from /opt/lianja/drivers/ to /usr/lib/apache2/modules/

2. Create the file /etc/apache2/mods-available/lianja.load with following contents:

LoadModule recital_module /usr/lib/apache2/modules/mod_lianja.so

3. Edit the required conf files in /etc/apache2/sites-enabled/ setting the DocumentRoot to:

DocumentRoot /opt/lianja/cloudserver/tenants/public/wwwroot

('public' is the default tenancy, set an alternative tenancy as required)

4. Edit /etc/apache2/apache2.conf and add the following access (changing tenancy as required):

<Directory /opt/lianja/cloudserver/tenants/public/wwwroot/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

5. Enable the lianja module:

$ sudo a2enmod lianja

6. Restart apache

$ sudo service apache2 restart

RedHat, Centos, Fedora

1. Copy the file mod_lianja.so from /opt/lianja/drivers/ to /etc/httpd/modules/

2. Edit the /etc/httpd/conf/httpd.conf file

  • Change the DocumentRoot to:
DocumentRoot "/opt/lianja/cloudserver/tenants/public/wwwroot"

('public' is the default tenancy, set an alternative tenancy as required)

  • Add the following access (changing tenancy as required):
<Directory "/opt/lianja/cloudserver/tenants/public/wwwroot">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

3. Create the file /etc/httpd/conf.d/lianja.conf with the following line:

LoadModule recital_module modules/mod_lianja.so

4. Restart apache

# systemctl restart httpd.service

Note: If running SELINUX you need to run the command below to allow HTTPD scripts and modules to connect to the network.

# /usr/sbin/setsebool -P httpd_can_network_connect 1

And to allow http and https firewall access:

# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https