-
1. Re: Use Apache mod_proxy or mod_rewrite to redirect to jboss
bvogt Oct 5, 2007 6:46 AM (in response to dehaven_becker)I cannot believe that they have hard-coded links...
If you use mod_proxy, have you configured:ProxyPreserveHost On
That should replace the name and port according to your apache configuration (at least it's working with Apache 2.0.x and JBP 2.4). -
2. Re: Use Apache mod_proxy or mod_rewrite to redirect to jboss
persabi Feb 1, 2008 9:53 PM (in response to dehaven_becker)I can successfully redirect to the portal using mod_proxy and/or mod_rewrite to get to the portal under port 8080 but there are no images or decorations on the portal once it paints in the browser.
I'm faced with the same problem. Basically followed the instructions here http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_proxyWithJBoss to setup mod_proxy with http. Portal works, I can register and get around portal, but content styling and images don't work.
Here is my httpd.confLoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so <VirtualHost *> ServerName myhost.test.com ServerAlias www.test.com ProxyRequests Off ProxyPreserveHost On <Proxy balancer://mycluster> Order deny,allow Allow from all BalancerMember http://myhost:8080/portal </Proxy> ProxyPass /portal balancer://mycluster ProxyPassReverse /portal http://myhost:8080/portal <Location /portal> Order allow,deny Allow from all </Location> </VirtualHost>
Any suggestions?
Vance -
3. Re: Use Apache mod_proxy or mod_rewrite to redirect to jboss
je.a.le Feb 5, 2008 9:54 AM (in response to dehaven_becker)I had the same issues weeks ago and i already got an answer from the forum :-)
jboos hidding on localhost behind apache.
Here one vhost config :
<virtualhost 127.0.0.1>
ServerName s1
RewriteEngine on
RewriteRule .* - [E=DEFAULT_PORTAL:s1]
RewriteRule .* - [E=DEFAULT_PAGE:p1]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* http://127.0.0.1:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_PAGE} [P]
RewriteCond %{REQUEST_URI} ^$
RewriteRule .* http://127.0.0.1:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_PAGE} [P]
RewriteCond %{REQUEST_URI} ^/TestServlet
RewriteRule ^/(.*)$ http://127.0.0.1:8080/$1 [P]
RewriteCond %{REQUEST_URI} ^/portal
RewriteRule ^/(.*)$ http://127.0.0.1:8080/$1 [P]
This redirect the url/domain "s1" to portal "s1".
One issues is custon themes. We solve the problems by simple put all our themes directly on jbossportal themes dir (then restart).
For others applications, like portlet, servlet, etc... that more tricky.
1) you create a vhost for each applications (!)
2) or like us, you add a rewritecond (ex testredirectportlet) each time. so
http://s1/TestRedirectServlet/page.jsp translate to localhost:8080/TestRedirectServelt/page.jsp
(in your code, the url is /TestServlet/page.jsp ) -
4. Re: Use Apache mod_proxy or mod_rewrite to redirect to jboss
mschwery Oct 4, 2010 3:20 PM (in response to je.a.le)I'm trying to get the following to work but it's not doing anything.
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* http://127.0.0.1:8080/index.html [P]
When I put in http://1.2.3.4/DocMgrAppInfo/index.jsp, I want it to go to http://127.0.0.1:8080/index.html. Can anyone give me some ideas?