I would recommend to use mod_rewrite in conjunction with mod_proxy, which provide more
flexibility for integration of content in the namespace of the virtual host. In order to
reduce maintenance effort should think about using include files like in the example
below.
Do you really need to use proxy-html?
http.conf:
...
| ServerTokens Prod
| ...
| LoadModule rewrite_module modules/mod_rewrite.so
| LoadModule proxy_module modules/mod_proxy.so
| ...
| RewriteEngine on
| RewriteCond %{REQUEST_METHOD} ^(TRACE|LOCK|UNLOCK)
| RewriteRule .* - [F]
| ...
|
| <virtualhost 127.0.0.1>
| ServerName
s1.org
| ...
| Include conf/s1.txt
| </virtualhost>
|
| <virtualhost 127.0.0.1>
| ServerName
s2.org
| ...
| Include conf/s2.txt
| </virtualhost>
|
s1.txt:
| RewriteRule .* - [E=DEFAULT_PORTAL:s1]
| RewriteRule .* - [E=DEFAULT_PAGE:p1]
|
| Include conf/common_rules.txt
|
s2.txt:
| RewriteRule .* - [E=DEFAULT_PORTAL:s2]
| RewriteRule .* - [E=DEFAULT_PAGE:p2]
|
| Include conf/common_rules.txt
|
common_rules.txt:
| RewriteCond %{REQUEST_URI} ^/$
| RewriteRule .*
http://localhost:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_P... [P]
| RewriteCond %{REQUEST_URI} ^$
| RewriteRule .*
http://localhost:8080/portal/portal/%{ENV:DEFAULT_PORTAL}/%{ENV:DEFAULT_P... [P]
|
| RewriteCond %{REQUEST_URI} ^/portal
| RewriteRule ^/(.*)$
http://localhost:8080/$1 [P]
|
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100511#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...