Forum Discussion
Provide Content of different Webapps with one Virtual Server
- Jun 07, 2023
nickLa248 I believe Mohamed_Ahmed_Kansoh is coming to the same result and your web app would need to add the additional path to the web app URI. As an example, when user goes to "/edge" they receive the edge web app but they still need to go to "/login" to log into the web app so the path if they did not login should be "/edge/login" rather than "/login" otherwise the F5 has no way of knowing that the "/login" request is for "/edge" web app. Now it is possible to have a default pool that handles authentication for each web app and hooks back to the appropriate web app using some sort of reference in a database that every web app communicates with but this seems like it would be fairly complicated. Your best option would the following assuming your web app is capable of doing it.
1. Have a unique hostname for each web app such as "edge.example.com" and then the URI path doesn't really matter at that point.
2. Have each web app function off of URI path such as "/edge/" and then each subsequent path would be added onto the URI such as "/edge/login" which would mean each web app has those paths available.Beyond this it seems that it would not be feasible to have multiple web apps on one virtual server because you cannot differentiate between the web apps.
Hi nickLa248 ,
You are using irule to forward traffic to specific pool based on the URI , For example /edge worked well and traffic forwarded to Edge_pool , but you are asking if the uri appeared /login traffic is RST.
>>>>
> First : did you assign a default pool under ( Resource TAB ) for that Virtual server ?
> Second : if you have multiple different web applications you should put conditions based on host names not URIs , as you can publish different web applications by one virtual server but you need to do that by irule/LTM policy to forward traffic based on host names.
> Third if you need to forward traffic based on URIs as you mentioned , you have to add all URIs in conditions and actions , I mean in your case /edge worked with you because it matches a conditions and the following action was triggered by forwarding traffic to Edge pool, if you have other URIs you have to create other conditions.
Let me know what do you try to acieve , if my answer not clear ?
- nickLa248Jun 07, 2023Nimbostratus
The connection is reset as the iRule is no longer triggered as /edge does lead to a connection to the webapp, showing its login page but the url of the login page is virtualServer/login resulting in the iRule condition no longer beeing executed which then results in no pool beeing selected.
<First: i did not assign a default pool as i dont have a service which should be shown by default
>Second: how would i use the host names to id the services? my best idea would have been some way to have some uri part like /edge to id the service requested and then have the uris of the webapp add to it, like /edge/login or /edge/home etc.
<Third: i thought of this but this require a lot of code depending on how many webapps should be served + a lot of maintenance also the biggest problem about this is what would i do if an uri is used by multiple services, for example /login
- Jun 07, 2023
Hi nickLa248 ,
I 've read the reply to Paulius ,
Try This :#Befor Pool Edgepool add this command : HTTP::uri "/edge/login" so it will become like that : if {$uri contains "/edge"}{ HTTP::uri "/edge/login" pool Edgepool }
I think you have resource locator in your web site like login.html or login.php
so if you know it add this part in the irule , iwill be like this :
HTTP::uri "/edge/login.php" or HTTP::uri "/edge/login.html" and .....etc
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