# Supporting two services on same VIP and Host Port

**URL:** <https://community.a10networks.com/t/supporting-two-services-on-same-vip-and-host-port/239>\
**Category:** aFleX\
**Created:** [November 21, 2013, 8:58pm UTC](https://community.a10networks.com/t/supporting-two-services-on-same-vip-and-host-port/239 "2013-11-21T20:58:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabourinj](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@sabourinj](https://community.a10networks.com/u/sabourinj)\
**Post date:** [November 21, 2013, 8:58pm UTC](https://community.a10networks.com/t/supporting-two-services-on-same-vip-and-host-port/239/1 "2013-11-21T20:58:56Z")

</div>

Hello,

I have a server running two web based services, both on port 443. I’m using host headers to differentiate between the two.

We have a need to add a second server for redundancy purposes. I’m curious which of the following (or some other I’m not thinking of?) method would be better:

A) Have both URLs go to one A10 VIP and use aFlex to re-write the outbound host headers such that the correct service is returned by the server

B) Change the existing applications to use two separate ports.  
Thanks in advance,

Justin

---

<div class="post-metadata">

**Author:** ![mischa](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mischa](https://community.a10networks.com/u/mischa)\
**Post date:** [November 22, 2013, 9:12am UTC](https://community.a10networks.com/t/supporting-two-services-on-same-vip-and-host-port/239/2 "2013-11-22T09:12:08Z")

</div>

Hi Justin,

My suggestion would be option C). Use an HTTP Template with App Switching to point different host headers to different service-groups. Config Mode → Service → Template → HTTP → App Switching. On the CLI it would look something like:

`slb template http tp-example host-switching ends-with domain1.tld service-group sg-group1-443 host-switching ends-with domain2.tld service-group sg-group2-443 !`
