Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Apache proxy configuration

If you have an existing Apache Config for translate5, you have only to add the

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so 
LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so

and the

ProxyPass /wss ws://example.translate5.net:9056/ 

to your HTTPS Vhost entry.

Warning

IMPORTANT: the domain in the ProxyPass command MUST match the configured domain in the Socket Server configuration in config.php (see below)



Code Block
titleExample Apache configuration
# enable the proxy modules in main apache configuration
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so

#
# example configuration of virtual host running translate5
#
<VirtualHost *:80>
    ServerName  example.translate5.net
    DocumentRoot /usr/srv/example.translate5.net/public
    # HTTP access is forbidden by redirecting always to HTTPS
    Redirect permanent / https://example.translate5.net/
</VirtualHost>

<VirtualHost *:443>
    ServerName  example.translate5.net
    DocumentRoot /usr/srv/example.translate5.net/public
    SSLEngine on
    SSLProxyEngine on										# The SSLProxyEngine must be enabled, otherwise you will get errors from apache on reload
    ProxyPass /wss ws://example.translate5.net:9056/        # IMPORTANT: the domain here MUST match the configured domain in the Socket Server configuration in config.php (see below)
</VirtualHost>

<VirtualHost *:443>
    ServerName  anotherexample.translate5.net
    DocumentRoot /usr/srv/anotherexample.translate5.net/public
    SSLEngine on
        # IMPORTANT: Another translate5 installation may use the same socket server, 
        # BUT the socket server may be configured only with one domain!
		# Therefore for anotherexample no separate proxypass is needed because the 
		# GUI must then be configured to use also wss://example.translate5.net!
</VirtualHost>

...