Forum Discussion

BKA_201457's avatar
BKA_201457
Icon for Nimbostratus rankNimbostratus
Feb 10, 2016

Apache Reverse Proxy migration to F5.

Hello all. I would really appreciate some help with this. I am trying to migrate an Apache config to a F5 LTM LB. I understand rewrites, but this one has me baffled. I have tried a few different scenarios and I cannot get it to work as expected. its not as simple as I thought, so I was hoping that someone else has run into this, and can at least guide me in the right direction. Do I need to have a separate request and response in the rewrite, or should I be looking to do this through an iRule? Or both?

 

 

Thanks in advance.

 

2 Replies

  • I'm not quite sure what your question is - are you asking for help understanding what your current RewriteRule does (it seems to rewrite "/" to "/ptg/rm"), or are you asking how to implement the same rule in an iRule (or ltm policy), or is the question something else ?

    If you were to use a policy, it would be something like this:

    ltm policy rewriteurls {
        requires { http }
        rules {
            rewrite_root {
                actions {
                    0 {
                        http-uri
                        replace
                        path /ptg/rm
                    }
                }
                conditions {
                    0 {
                        http-uri
                        path
                        values { / }
                    }
                }
                ordinal 1
            }
        }
        strategy first-match
    }
    

    Does that help ?

  • I know how to rewrite "/" to "/ptg/rm". I think I am over-thinking it. Thanks for the response. Made me realize that I was looking at it wrong. It just isnt working. Its working through the current reverse proxy configuration, but I cannot get it to work through the F5. I have plenty of others working through the F5, but this one seems different. I'll figure it out. Thanks again.