Forum Discussion
Problem with F5 Lync reverse proxy irule
Hi all,
I'm using the F5 Deployment Guide for Lync iApp in v11, and I'm looking at the irule provided in the documentation here: http://www.f5.com/pdf/deployment-guides/microsoft-lync-iapp-dg.pdf
See page 23, I'm using this:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
chat.example.com { pool front_end_pool }
www.example.com {
switch [string tolower [HTTP::uri]] {
/meet { pool front_end_pool }
}
}
www.example.com {
switch [string tolower [HTTP::uri]] {
/dialin { pool front_end_pool }
}
}
lyncdiscover.example.com { pool front_end_pool }
}
}
However when I visit www.example.com/meet or www.example.com/dialin, the irule doesn't match the URI.
I've edited the irule to add a debug statement, so now it looks like this:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
chat.example.com {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
pool front_end_pool }
www.example.com {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
switch [string tolower [HTTP::uri]] {
/meet {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
pool front_end_pool }
}
}
www.example.com {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
switch [string tolower [HTTP::uri]] {
/dialin {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
pool front_end_pool }
}
}
lyncdiscover.example.com {
log local0. "[IP::client_addr]:[TCP::client_port]: [string tolower [HTTP::host]][string tolower [HTTP::uri]]"
pool front_end_pool }
}
}
When I tail -f /var/log/ltm it gives me "www.example.com" at the appropriate place but does not give me the statement with the URI inside the switch statements for /meet and /dialin.
Where am I going wrong? I copied this exactly out of the deployment guide.
All help appreciated.
6 Replies
- nitass
Employee
just curious why there are www.example.com twice. - marvn_58503
Nimbostratus
I would've thought it could logically be compressed into the same evaluation, but that's how it comes in the deployment guide (and is what the iapp generates also) so I have to assume it can work?
I've also got a case open with technical support asking why the switch statement doesn't seem to be matching, so we'll see what they say. - marvn_58503
Nimbostratus
Using code from this thread https://devcentral.f5.com/community/group/aft/2166131/asg/50 I've managed to fix the issue.
I have updated my thread with technical support, hopefully it can go in their knowledgebase and indeed the documentation can be fixed.
My irule now looks like this:EDIT: Formatting got messed up, not sure how. I've had to provide further replies in the thread with the CODE.
- marvn_58503
Nimbostratus
When not using Lync Directorwhen HTTP_REQUEST { switch [string tolower [HTTP::host]] { chat.example.com { pool front_end_pool } www.example.com { switch -glob [string tolower [HTTP::uri]] { "/meet*" { pool front_end_pool } } "/dialin*" { pool front_end_pool } } } lyncdiscover.example.com { pool front_end_pool } } } - marvn_58503
Nimbostratus
When using Lync Directorwhen HTTP_REQUEST { switch [string tolower [HTTP::host]] { chat.example.com { pool front_end_pool } dir.example.com { pool director_pool } www.example.com { switch -glob [string tolower [HTTP::uri]] { "/meet*" { pool director_pool } } "/dialin*" { pool director_pool } } } lyncdiscover.example.com { pool front_end_pool } } } - marvn_58503
Nimbostratus
Note on both of the above entries there is an extra } on the line after "/meet*" which is not required, however when I go to edit the above it mangles up the code box so I can't fix them.
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