Forum Discussion
Using a Single Virtual IP to publish multiple URL's
- Feb 22, 2014
Definitely. You don't even need to use an iRule - an HTTPClass profile would be able to do this for you. http://support.f5.com/kb/en-us/solutions/public/7000/200/sol7280.html
You would have a single virtual server and multiple pools, and then use the profile or an iRule to direct traffic to one pool or another based on the Host header.
If you wanted to use an iRule then a simple format would be;-
when HTTP_REQUEST { switch [HTTP::host] { "site1.company.com.au" { pool pl_site1 } "site2.company.com.au" { pool pl_site1 } default { Use pool attached to virtual - no action required } } }
Definitely. You don't even need to use an iRule - an HTTPClass profile would be able to do this for you. http://support.f5.com/kb/en-us/solutions/public/7000/200/sol7280.html
You would have a single virtual server and multiple pools, and then use the profile or an iRule to direct traffic to one pool or another based on the Host header.
If you wanted to use an iRule then a simple format would be;-
when HTTP_REQUEST {
switch [HTTP::host] {
"site1.company.com.au" {
pool pl_site1
}
"site2.company.com.au" {
pool pl_site1
}
default {
Use pool attached to virtual - no action required
}
}
}
- Wolf46_144992Feb 23, 2014
Nimbostratus
Hi IheartF5, Thank you for your answer. Seems quite straight forward once you know the syntax of the iRule. I will also try using and HTTPClass as they seem quite simple to use. Do you know if these can be used also when publishing content using an iApp?
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