/etc/init.d/apache2-websockets start
---------------------------------------------------------------------------
+Optional: Using a web proxy (Apache 2.4 and above)
+--------------------------------------------------
+When the OpenSRF HTTP Translator runs behind a proxy, Apache must be
+configured to read the IP address of the originating client instead
+of the proxy IP address.
+
+1. Enable mod_remoteip
++
+[source,bash]
+---------------------------------------------------------------------------
+sudo a2enmod remoteip
+---------------------------------------------------------------------------
++
+2. Enable remote IP settings by uncommenting and modifying as needed the
+Apache configuration variables starting with RemoteIP* in the sample Apache
+configuration file opensrf.conf.
+
Optional: Using NGINX as a proxy
--------------------------------
NGINX can be used to proxy HTTP, HTTPS, and WebSockets traffic. Among other
# OpenSRF-over-HTTP translator
# (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
# ----------------------------------------------------------------------------------
+
+ # OPTIONAL: Running the translator behind a proxy requires accessing
+ # the client IP address via mod_remoteip (sudo a2enmod remoteip).
+ # Below is a sample configuration for a proxy running on the same
+ # server and passing the client IP address via the X-Real-IP header.
+ #
+ #RemoteIPInternalProxy 127.0.0.1/24
+ #RemoteIPInternalProxy ::1
+ #RemoteIPHeader X-Real-IP
+
<Location /osrf-http-translator>
SetHandler osrf_http_translator_module
allow from all
trans->connecting = 0;
trans->disconnecting = 0;
#ifdef APACHE_MIN_24
- trans->remoteHost = apreq->connection->client_ip;
+ trans->remoteHost = apreq->useragent_ip;
#else
trans->remoteHost = apreq->connection->remote_ip;
#endif