Simple Web Server

  • Even though not set service group or real server, when slb received http request response a simple page and some system variable.

Requirement

  • Service Type: HTTP / HTTPS

Code

# Simple Web Server
when HTTP_REQUEST {
  HTTP::respond 200 content "
    <html>
      <head>
        <title>A10 SLB Site 1</title>
      </head>
      <body>
        This is SLB Site 1 http://[HTTP::host][HTTP::uri]<br />
        <br />
        remote_addr (Source IP) => local_addr (Virtual IP)<br />
        [IP::remote_addr]:[TCP::remote_port] => [IP::local_addr]:[TCP::local_port]<br />
        <br />
        client_addr (A10/SNAT_IP) => server_addr (Backend Server)<br />
        IP: [IP::client_addr]:[TCP::client_port] => [IP::server_addr]:[TCP::server_port]<br />
        <br />
        IP: protocol: [IP::protocol]<br />
      </body>
    </html>
  "
}
a10/slb/aflex/http/return-html.txt · 上一次變更: 2014/04/24 18:41 由 jal
上一頁 | 下一頁 | 回首頁 | RSS Feed | Facebook