Configuring the Reverse Proxy

This section explains how to configure the reverse proxy for 3DSpace by customizing the Apache httpd.conf file.

The No CAS server should not be exposed to end users and is dedicated to FCS, batches and indexation.

  1. Edit the Apache httpd.conf file.
  2. Set the listen tag to the correct port number for the service, for example: Listen 444.
  3. Activate the modules required for the service. See the Program Directory for the list of modules.
  4. Customize the <VirtualHost> tag.

    First, customize the reverse proxy server name and server alias, for example:

    ServerName myserver
    ServerAlias myserver

    Then, activate SSL:

    SSLEngine on
    SSLProxyEngine On

    Then, specify the SSL certificates definition, for example:

    SSLCertificateFile "pathtoyourcertificate\myserver.cer"
    SSLCertificateKeyFile "pathtoyourcertificate\myserver.key"

    Add the following line to declare the reverse proxy configuration generated by the service installation:

    Include <3DSpaceInstallPath>\win_b64\templates\3DSpace_httpd_fragment.conf (Windows)
    Include <3DSpaceInstallPath>/linux_a64/templates/3DSpace_httpd_fragment.conf (Linux)

    because the service installation creates the following file:

    <3DSpaceInstallPath>\win_b64\templates\3DSpace_httpd_fragment.conf (Windows)
    <3DSpaceInstallPath>/linux_a64/templates/3DSpace_httpd_fragment.conf (Linux)

    and the file already contains the necessary declarations for the reverse proxy.

    The contents of the CORS header declaration are also in this file.

  5. If you unchecked Install the application server during the installation, add the following lines to the <VirtualHost _default_:443> section of the httpd-ssl.conf file to configure to configure CAS and NoCAS connections:

    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Port "443"
    
    ProxyPass /3dspace        http://<hostname_3DSpace_server>:<portAppServerCAS>/3dspace
    ProxyPassReverse /3dspace http://<hostname_3DSpace_server>:<portAppServerCAS>/3dspace
    
    ProxyPass /internal        http://<hostname_3DSpace_server>:<portAppServerNoCAS>/internal
    ProxyPassReverse /internal http://<hostname_3DSpace_server>:<portAppServerNoCAS>/internal