Configure Apache for Each New Tenant - Fluid Topics - 4.0

Install Fluid Topics on Multiple Servers

Operating system
RHEL
Category
Technical Notes
Audience
public
Version
4.0

This step is to be performed on each server hosting the Front environment.

To generate a basic Apache configuration for the new tenant:

  1. Run the following command:

    As root user

    /usr/local/afs7/contrib/v7.8/python/3.4/bin/ft_generate_apache_virtual_host_conf -s $SERVICE_ID -S $SERVICE_STATUS -dn $DOMAIN_NAME | sudo tee /etc/httpd/conf.d/$DOMAIN_NAME.conf

    If using a Load Balancer to connect several fronts, the $DOMAIN_NAME should be provided by the Load Balancer.

    A basic Apache configuration like the following one is displayed:

<VirtualHost *:80>
ServerName http://my-portal.fluidtopics.net

Include /usr/local/afs7/Fluid-Topics/templates/apache2/common.conf
</VirtualHost>
<Location "/">
ProxyPass "http://my-portal.fluidtopics.net"
ProxyPassReverse "http://my-portal.fluidtopics.net"
SetEnv tenant "$TENANT_ID/$TENANT_STATUS"
SetEnv path_prefix ""
</Location>

  1. Edit the following file:

    As root user

    /etc/httpd/conf.d/$DOMAIN_NAME.conf

  2. Add the following lines after the ServerName line:

    DocumentRoot /var/www/html/
    Header always append X-Frame-Options SAMEORIGIN
    <Directory /var/www/html>
    Options -Indexes
    Order deny,allow
    Allow from all
    </Directory>