Redirecting Port 80 to 8080
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 07:44 AM
Hello,
Below is my configuration for redirecting http://apps.domain.local to http://apps.domain.local:8080. Please let me know if I am on the right track.
Thanks,
rserver redirect REDIRECT_TO_8080
description SAP BO Redirect RServer from 80 to 8080
webhost-redirection http://%h%p:8080 301
inservice
serverfarm redirect SF_REDIRECT_8080
description SAP BO Redirect RServer from 80 to 8080
rserver REDIRECT_TO_8080
inservice
class-map match-all VIP_SAP_BO_8080
2 match virtual-address 10.1.0.99 tcp eq 8080
class-map match-all VIP_SAP_BO_80
2 match virtual-address 10.1.0.99 tcp eq 80
policy-map type loadbalance first-match PM_REDIRECT_8080
class class-default
serverfarm SF_REDIRECT_8080
policy-map type loadbalance first-match PM_LB_SAP_BO
description Load Balance Policy for SAP Business Objects
class class-default
sticky-serverfarm IP_STICKY_SAP_BO
policy-map multi-match PM_MULTI_MATCH_LB
description Load Balancing Service Policy 1
class VIP_VIP_SAP_BO_80
loadbalance vip inservice
loadbalance policy PM_REDIRECT_8080
loadbalance vip icmp-reply active
class VIP_SAP_BO_8080
loadbalance vip inservice
loadbalance policy PM_LB_SAP_BO
loadbalance vip icmp-reply active
- Labels:
-
Application Networking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 09:56 AM
What you are trying to achive can be achieved by
class-map match-all YourVIP
2 match virtual-address 10.1.0.99 tcp eq www
rserver host YOURRSERVER1
ip address y.y.y.1
inservice
rserver host YOURRSERVER2
ip address y.y.y.2
inservice
serverfarm host YOURSERVERFARM
rserver YOURRSERVER1 8080
inservice
rserver YOURRSERVER2 8080
inservice
policy-map type loadbalance first-match YOURPOLICY
class YourVIP
serverfarm YOURSERVERFARM
policy-map multi-match YOURVIPS
class YourVIP
loadbalance vip inservice
loadbalance policy YOURPOLICY
Syed Iftekhar Ahmed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2009 06:09 AM
Hello,
Thank you very much for your reply, the request has changed. For example, when the clients enter http://apps.domain.local. I would like the ACE to redirect traffic to http://apps.domain.local:8080/apps.jsp.
I great appreciate your assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 03:50 AM
Allen,
the config that was given to you will send transparently the client to your server on port 8080.
But it won't change the HTTP request itself.
So, even if the server correctly receive the request on its port 8080, it will still look like http://apps.domain.local.
If you run Apache virtual server, this won't work since Apache will look at the request to determine which server is being called.
You can fix this problem by running multiple instance of Apache and getting rid of virtual server.
This is easier and much better in term of performance.
If really this is not possible, you need to create an HTTP redirect rserver and serverfarm on ACE, intercept the query with your class-map and use the redirect serverfarm instead of the real server serverfarm.
Then you need another class-map to catch traffic coming back on vip:8080 and loadbalance it to the rservers.
But honestly, go for the first solution.
Fix the servers.
G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2010 08:54 AM
Hello,
I have the similar requirement and i have tried unsuccessfully to achieve it, will appreciate your help on it. Below is the scenario, ace loadbalances request recieved on port 8080 but when ace receives the request on port 80, iam unable to redirect to port 8080. Please let me know mistake in this configuration as it doesnt seems to work.
And the configuration is as follows:
access-list permitany line 8 extended permit ip any any
access-list permitany line 9 extended permit icmp any any
access-list permitany line 10 extended permit tcp any any
probe tcp CONTENT-PROBE-SERVERS-8080
port 8080
interval 30
passdetect interval 10
open 1
rserver host CONTENT-SERVER-1
ip address 192.168.3.130
inservice
rserver host CONTENT-SERVER-2
ip address 192.168.3.140
inservice
serverfarm host CONTENT-SERVERS-8080
probe CONTENT-PROBE-SERVERS-8080
rserver CONTENT-SERVER-1 8080
inservice
rserver CONTENT-SERVER-2 8080
inservice
sticky ip-netmask 255.255.255.255 address source STICKY-CONTENT-SERVERS-8080
timeout 120
replicate sticky
serverfarm CONTENT-SERVERS-8080
class-map match-any CMAP-CONTENT-SERVERS-8080
2 match virtual-address 192.168.3.145 tcp eq 8080
class-map match-any CMAP-WEB-SERVERS-80
2 match virtual-address 192.168.3.145 tcp eq www
class-map type management match-any remote_access
2 match protocol xml-https any
3 match protocol icmp any
4 match protocol telnet any
5 match protocol ssh any
6 match protocol http any
7 match protocol https any
8 match protocol snmp any
policy-map type management first-match MANAGEMENT-ACCESS
class remote_access
permit
policy-map type loadbalance first-match PMAP-CONTENT-SERVERS-8080
class class-default
sticky-serverfarm STICKY-CONTENT-SERVERS-8080
policy-map type loadbalance first-match PMAP-WEB-SERVERS-80
class class-default
sticky-serverfarm STICKY-CONTENT-SERVERS-8080
policy-map multi-match NLB-SERVERS
class CMAP-WEB-SERVERS-80
loadbalance vip inservice
loadbalance policy PMAP-WEB-SERVERS-80
loadbalance vip icmp-reply
class CMAP-CONTENT-SERVERS-8080
loadbalance vip inservice
loadbalance policy PMAP-CONTENT-SERVERS-8080
loadbalance vip icmp-reply
nat dynamic 1000 vlan 113
interface vlan 113
description **** CLIENT VLAN ****
bridge-group 1
mac-sticky enable
no icmp-guard
access-group input NONIP
access-group input permitany
access-group output permitany
nat-pool 1000 192.168.3.145 192.168.3.145 netmask 255.255.255.255 pat
service-policy input MANAGEMENT-ACCESS
service-policy input NLB-SERVERS
no shutdown
interface vlan 500
description **** SERVER VLAN ****
bridge-group 1
access-group input NONIP
access-group input permitany
access-group output permitany
service-policy input MANAGEMENT-ACCESS
no shutdown
interface bvi 1
ip address 192.168.3.234 255.255.255.0
alias 192.168.3.236 255.255.255.0
peer ip address 192.168.3.235 255.255.255.0
no shutdown
