Forum Discussion
Multiple Websites on Single VIP
I would use two VIPs, one for HTTP and one for HTTPS. On the HTTP VIP you will want to create an iRule that redirects to HTTPS. You can use the built in iRule that exists for this, _sys_https_redirect or somthing like this if you want a 301 if you ever plan to use HSTS:
when HTTP_REQUEST {
set my_loc "https://[HTTP::host][HTTP::uri]"
TCP::respond "HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"
TCP::close
}
On the HTTPS VIP you will want to create a client SSL Profile for each site and use the "Server Name" field to enable SNI. With SNI you will need to create one of those profiles as the default for legacy clients, but you can also set the default profile to require SNI if you so desire.
- Wasim_Hassan_13Nov 20, 2014
Nimbostratus
I have applied the rules, for default bulitin HTTP to HTTPS and one has mention below ltm rule PROXY_TEST2 { partition REVERSE_PROXY when HTTP_REQUEST { set my_loc "https://[HTTP::host][HTTP::uri]" TCP::respond "HTTP/1.1 301 Moved Permanently\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n" TCP::close } I have created two VIP one for HTTPS and one for HTTP but no luck. i can see the hit on VS and secuirty error page but not able to open the page.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com