Forum Discussion
NielsH_187296
Mar 30, 2015Nimbostratus
Multiple virtual servers for multiple applications on one server
Hi all,
So we have a server here housing multiple webapplications, each with its respective sub-URI such as /capacity/, /track/, etc..
So we would like to create a virtual server for every applic...
giltjr
Mar 30, 2015Nimbostratus
I think this is causing you problems: "HTTP::uri "/$path[HTTP::uri]"
If they enter "www-acg.bru-hub.comp.com/capacity/" what you are then doing is changing that to "www-acg.bru-hub.comp.com/capacity/capcacity"
I also don't think you need the line "HTTP::header replace Host "www-acg.bru-hub.comp.com"" because the host header should already be that.
I modified what I use to select which pool to go to, which I got the original code from here on Dev Central. However I don't think you need the "HTTP::uri "/$path[HTTP::uri]" code you have:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/capacity/*" {pool Live-CMS-pool; set path "capacity"}
"/track/*" {pool live-TRACK-poolset; path "track"}
default {HTTP::respond 404 content "Application pool $pool does not exist." Mime-Type "text/html"}
}
log local0. "URI is: [HTTP::uri], pool is $pool, host is [HTTP::host]"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects