[jboss-user] [JBoss Portal] - Re: Use Apache mod_proxy or mod_rewrite to redirect to jboss

je.a.le do-not-reply at jboss.com
Tue Feb 5 09:54:17 EST 2008


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 )

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126566#4126566

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126566



More information about the jboss-user mailing list