Personal tools

From HEXONET Wiki

Jump to: navigation, search

High Performance Proxy Setup

Long distances to our main data center in Germany may result in high network latencies. If you encounter such problems, we highly recommend to use this setup, as it uses persistent connections to our API server and the overhead for connection establishments is omitted.


Step 1: Required Apache2 packages and modules

At least Apache version 2.2.9 is required.

The following Apache2 modules must be installed and activated:

proxy.conf
proxy.load
proxy_http.load
ssl.conf # for HTTPs connection to our API server
ssl.load # for HTTPs connection to our API server

Step 2: Apache configuration

An example Apache configuration with binding to localhost:

<VirtualHost 127.0.0.1:80>
        ServerAdmin webmaster@localhost

        ServerSignature Off

        SSLProxyEngine on
        ProxyPass /api/call.cgi https://api.ispapi.net/api/call.cgi min=1 max=2
        <Proxy *>
                Order Deny,Allow
                Deny from none
                Allow from all
        </Proxy>
</VirtualHost>

After saving your configuration changes please restart the Apache webserver.


Step 3: Use the proxy on localhost as API socket

Your current API socket URL probably looks like this:

https://api.ispapi.net/api/call.cgi?s_entity=ENTITY&s_login=LOGIN&s_pw=PASSWORD

Please change it to:

http://127.0.0.1/api/call.cgi?s_entity=ENTITY&s_login=LOGIN&s_pw=PASSWORD