On 3/11/13 6:45 PM, Cyril Bonté wrote:
You can do it directly by using a trick with the "http-send-name-header" keyword [1], with "Host" as the header name. Then, be sure to name your backend servers with their hostname, and that's it ;-)
Yep, I got that working with this config:


backend app-operations-console
        server rhesprodapp01 10.250.52.216:7072 check ssl
#       server rhesprodapp02 10.250.52.217:7072 check ssl


backend app-console-selfservice
        http-send-name-header Host
        balance source
#        reqirep ^Host     Host:\ rhesprodapp01.domain.com:7004
server rhesprodapp01.domain.com:7004 rhesprodapp01.domain.com:7004 check ssl
#       server rhesprodapp02 10.250.52.217:7004 check ssl

frontend app
        timeout         client 86400000
        mode            http
        option          httpclose
        option          forwardfor
        option          http-server-close
bind :443 ssl crt jewels.com.crt ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
        default_backend app-console-selfservice
        acl url_app_ops path_beg /operations-console
rspirep ^Location:\s*https://([^/]*)/(.*)$ Location:\ https://myapp.domain.com/\2
        use_backend app-operations-console if url_app_ops


Reply via email to