Prev: Next: , Up: Top[Contents][Index]


4 Simple Proxy

In this chapter we will deploy several simplest proxying configurations to illustrate the concepts introduced above.

Suppose you have an HTTP server running on localhost port 8080, and want to make it accessible from outside. This is achieved by the following configuration file:

ListenHTTP
    Address 0.0.0.0
    Port 80
    Service
        Backend
            Address 127.0.0.1
            Port 8080
        End
    End
End

This configuration consists of three nested sections: ListenHTTP, Service, and Backend. Each section ends with a keyword End on a line by itself.

The first thing that draws attention are Address and Port statements appearing in both listener and backend sections. In ListenHTTP they specify the IP address and port to listen on for incoming requests. Address ‘0.0.0.0’ stands for all available IP addresses. In Backend section, these keywords specify the address and port of the remote server, where incoming requests are to be forwarded.

The Service section has no matching conditions, so it will match all requests.