Forum Discussion
Port Translate for 1 Server with Many Port
Hi
I have a question to ask you guys. I have configured as below;
Pool Name: Pool7004 - server1 port 7004 - server2 port 7004
-Virtual Server Name: Pool7004_80 I do the port translate to HTTP 80. It work as I want it. So user no need to enter port 7004 when browse to that server. example before: www.test.com:7004/flash after:www.test.com/flash
The problem is this server has many different services and port. I have configured as usual the pool and virtual server base on the service port. Example: www.test1.com:8004/gigs www.test2.com:9004/left
I need this port also translate to port 80 as user don't need to enter the port when browsing. Can it be done within the same server.
Thanks a lots
7 Replies
- Kevin_Stewart
Employee
Is there any mapping scheme to the URIs and ports? Example:
/left = 7004 /gigs = 8004 /flash = 7004 - fik_136556
Nimbostratus
HI Kevin
Thanks for reply. I'm not doing any mapping scheme or irule. Not so familiar with irule code.
I just tick the port translate in advance mode of Virtual Server.
Thanks
- Thomas_Gobet
Nimbostratus
Hi,
The question is not on your iRule configuration but on your Webserver.
That will permit us to give you the iRule you need. - fik_136556
Nimbostratus
Virtual_Server_8004 - 10.1.1.2:8004 Virtual_Server_7004 - 10.1.1.2:7004 Virtual_Server_9704 - 10.1.1.2:9704
I have created all this VS in F5. All working fine. User need to enter full url with port to browse the web app.
FYI, this is weblogic oracle server. that's why got so many services and port within the same server. yes the webserver already map this port and url. All working fine. I just need to translate all port to 80 port.
Thanks for reply.
- Thomas_Gobet
Nimbostratus
Here is the iRule you need. You have to apply in on your virtual server listening on port 80.
when HTTP_REQUEST { switch [HTTP::uri] { /left { pool left_pool_port } /gigs { pool gigs_pool_port } /flash { pool flash_pool_port } } } - fik_136556
Nimbostratus
Hi
Thank thomas.
I will try it.
Virtual Server port 80 I need to bind it with which Pool ? All Pool port or how ?
Thanks
- Thomas_Gobet
Nimbostratus
Hi,
You don't need to bind your virtual server with a default pool if every condition are matched by your iRule.
If there's a default condition, you have 2 options :-
Add this to your iRule :
default { pool default_pool_name }
-
Define a default pool in your virtual server parameters.
-
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