I have a number of other applications (CGI/Perl, PHP, etc.) running on my apache web
servers and use ModJk to loadbalance/forward certain URLs to my JBoss app servers.
I have URL's like the following
http://my.host.com/cgi_program
|
http://my.host.com/php_program
|
http://my.host.com/portal/myportal (this is what I want anyway)
I have ModJk configurations like this
JkMount /portal
| JkMount /portal/*
This is to forward/loadbalance the portal request from apache servers to my jboss servers
for scalability and failover. If I change the context root to "/" instead of
"/portal" then that works fine for page URLs, but action urls such as the ones
in the UserPortlet don't work. Apache isn't forwarding those request to the jboss
server because the "/portal" context root is gone.
Look at the URL for the "Standard Login" link in UserPortlet. If the context
root is "/portal" (the default) this link looks like this.
http://localhost/portal/auth/index.html.......
If you change the context root to "/" then that link looks like this.
http://localhost/auth/index.html.......
Notice that the "/portal" appears nowhere.
If I put port 8080 in my url explicitly and don't forward through apache it works, but
I can't do that in production. The problem is that I have to have a context root to
base my ModJk redirects on. I can't use a ModJK config that looks like this because
that would redirect all URLs to the app servers and my other applications won't work.
JkMount /
| JkMount /*
My first thought was, "fine I'll just put /auth in the ModJk config" but
that's not going to work either because /auth isn't the only URL. Look at the
"create one" link in the UserPortlet.
With context root /portal this is the URL
http://localhost/portal/index.html......
|
With context root / this is the URL
http://localhost/index.html......
If I don't have a context root then I can't do anything with this URL. It just
doesn't work without a context root if I'm forwarding from apache.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959175#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...