You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sebastien ARBOGAST <se...@gmail.com> on 2008/06/22 19:21:42 UTC

Configuring mod_jk in a virtual host to mount one specific application?

I've got my JBoss 4.2 server running and I managed to configure one virtual
host with mod_jk to get to it without having to enter the 8080 port.Here is
my VirtualHost configuration:


<VirtualHost *:80>
    ServerAdmin sebastien.arbogast@gmail.com
    ServerName myserver.com

    JkMount /* loadbalancer

    ErrorLog /var/log/apache2/myserver-error.log
    # Possible values include: debug, info, notice, warn, error, crit,

    # alert, emerg.


    LogLevel warn
    CustomLog /var/log/apache2/myserver-access.log combined


</VirtualHost>


So no when I access the JIRA application installed on this server, I can do
it either from http://myserver.com:8080/jira or from
http://myserver.com/jira
Now I would like to be able to skip the jira suffix and access this same
application from http://myserver.com, but without making JIRA the home
application on my JBoss server.


Is that possible? How can I do that?

-- 
Sébastien Arbogast

http://sebastien-arbogast.com

Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Sebastien ARBOGAST <se...@gmail.com>.
My purpose was to hide two things:- the 8080 port in the URL, not only for
cosmetic reasons but also to prevent issues with my corporate firewall
blocking everything but 80
- the fact that my application runs under /jira application context by using
a subdomain like they do it on bugs.adobe.com for example... but I just
realized that they also have jira in the URL at the end so I guess it's too
hard to be worth it.

Thanks a lot to you guys.

Sebastien

2008/6/22 Rainer Jung <ra...@kippdata.de>:

> Sebastien ARBOGAST schrieb:
>
>> Thanks a lot. Now it works great.
>> One last thing though: when the page is displayed, the end URL is still
>> http://bugs.epseelon.org/jira
>> Is there a way not to show the redirected URL ?
>>
>
> The redirect comes from the JBoss behind the Apache.
>
> Getting rid of those could be done via mod_proxy instead of mod_jk. But
> before, you should check, if Jira actually supports running under a reverse
> proxy, that changes the URL prefix.
>
> At least this
>
>
> http://jira.atlassian.com/browse/JRA-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>
> seems to indicate, that Jira will produce links which contain the context
> path, so the outside world will always know:
>
> "JIRA always references absolute URLs, including the context path (the path
> at which you deployed JIRA)."
>
> I don't know though, if this is still up to date.
>
> I never tried it, but maybe something like the following could do the same
> trick as mod_proxy with ProxyPassReverse:
>
> Load module mod_headers
>
> Add to your VirtualHost (one long line):
>
> Header always edit Location http://myserver.com/jira/ http://myserver.com/
>
> Then test with a commandline browser like curl, what you get for
>
> curl -v -D - http://myserver.com/
>
> If it doesn't work you could try
>
> Header always edit Location http://myserver.com/jira/(.*)
> http://myserver.com/$1
>
> which should be equivalent, but that's not 100% clear from the docs.
>
> If your original aim was only making Jira available under
> http://my.server.com/, and you don't care much about the followup URLs
> (that's what most people want), then you don't need mod_rewrite:
>
> RedirectMatch permanent ^/$ http://myserver.com/jira/
>
> (which is implemented in mod_alias).
>
> Regards,
>
> Rainer
>
>  2008/6/22 David Smith <dn...@cornell.edu>:
>>
>>  This added before your RewriteRule prevents requests to /jira/* from
>>> being
>>> handled by the rewrite rule.  This should break the endless redirect:
>>>
>>> RewriteCond     %{REQUEST_URI}   !^/jira/.*
>>>
>>> --David
>>>
>>>
>>> Sebastien ARBOGAST wrote:
>>>
>>>  Thanks a lot for these precisions. I already had mod_rewrite loaded but
>>>> when
>>>> I configured my VirtualHost like the following, I got a redirect loop
>>>> error:
>>>> <VirtualHost *:80>
>>>>   ServerAdmin sebastien.arbogast@gmail.com
>>>>   ServerName bugs.epseelon.org
>>>>
>>>>   RewriteEngine On
>>>>   RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>>   RewriteLog /var/log/apache2/rewrite.log
>>>> RewriteLogLevel 9
>>>>
>>>>   JkMount /* loadbalancer
>>>>
>>>>   ErrorLog /var/log/apache2/jira-error.log
>>>>   # Possible values include: debug, info, notice, warn, error, crit,
>>>>
>>>>   # alert, emerg.
>>>>
>>>>   LogLevel warn
>>>>   CustomLog /var/log/apache2/jira-access.log combined
>>>>
>>>> </VirtualHost>
>>>>
>>>> Here is the full log in rewrite.log:
>>>>
>>>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Sébastien Arbogast

http://sebastien-arbogast.com

Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Rainer Jung <ra...@kippdata.de>.
Sebastien ARBOGAST schrieb:
> Thanks a lot. Now it works great.
> One last thing though: when the page is displayed, the end URL is still
> http://bugs.epseelon.org/jira
> Is there a way not to show the redirected URL ?

The redirect comes from the JBoss behind the Apache.

Getting rid of those could be done via mod_proxy instead of mod_jk. But 
before, you should check, if Jira actually supports running under a 
reverse proxy, that changes the URL prefix.

At least this

http://jira.atlassian.com/browse/JRA-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

seems to indicate, that Jira will produce links which contain the 
context path, so the outside world will always know:

"JIRA always references absolute URLs, including the context path (the 
path at which you deployed JIRA)."

I don't know though, if this is still up to date.

I never tried it, but maybe something like the following could do the 
same trick as mod_proxy with ProxyPassReverse:

Load module mod_headers

Add to your VirtualHost (one long line):

Header always edit Location http://myserver.com/jira/ http://myserver.com/

Then test with a commandline browser like curl, what you get for

curl -v -D - http://myserver.com/

If it doesn't work you could try

Header always edit Location http://myserver.com/jira/(.*) 
http://myserver.com/$1

which should be equivalent, but that's not 100% clear from the docs.

If your original aim was only making Jira available under 
http://my.server.com/, and you don't care much about the followup URLs 
(that's what most people want), then you don't need mod_rewrite:

RedirectMatch permanent ^/$ http://myserver.com/jira/

(which is implemented in mod_alias).

Regards,

Rainer

> 2008/6/22 David Smith <dn...@cornell.edu>:
> 
>> This added before your RewriteRule prevents requests to /jira/* from being
>> handled by the rewrite rule.  This should break the endless redirect:
>>
>> RewriteCond     %{REQUEST_URI}   !^/jira/.*
>>
>> --David
>>
>>
>> Sebastien ARBOGAST wrote:
>>
>>> Thanks a lot for these precisions. I already had mod_rewrite loaded but
>>> when
>>> I configured my VirtualHost like the following, I got a redirect loop
>>> error:
>>> <VirtualHost *:80>
>>>    ServerAdmin sebastien.arbogast@gmail.com
>>>    ServerName bugs.epseelon.org
>>>
>>>    RewriteEngine On
>>>    RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>    RewriteLog /var/log/apache2/rewrite.log
>>> RewriteLogLevel 9
>>>
>>>    JkMount /* loadbalancer
>>>
>>>    ErrorLog /var/log/apache2/jira-error.log
>>>    # Possible values include: debug, info, notice, warn, error, crit,
>>>
>>>    # alert, emerg.
>>>
>>>    LogLevel warn
>>>    CustomLog /var/log/apache2/jira-access.log combined
>>>
>>> </VirtualHost>
>>>
>>> Here is the full log in rewrite.log:

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Sebastien ARBOGAST <se...@gmail.com>.
Thanks a lot. Now it works great.
One last thing though: when the page is displayed, the end URL is still
http://bugs.epseelon.org/jira
Is there a way not to show the redirected URL ?

2008/6/22 David Smith <dn...@cornell.edu>:

> This added before your RewriteRule prevents requests to /jira/* from being
> handled by the rewrite rule.  This should break the endless redirect:
>
> RewriteCond     %{REQUEST_URI}   !^/jira/.*
>
> --David
>
>
> Sebastien ARBOGAST wrote:
>
>> Thanks a lot for these precisions. I already had mod_rewrite loaded but
>> when
>> I configured my VirtualHost like the following, I got a redirect loop
>> error:
>> <VirtualHost *:80>
>>    ServerAdmin sebastien.arbogast@gmail.com
>>    ServerName bugs.epseelon.org
>>
>>    RewriteEngine On
>>    RewriteRule ^/(.*)$ /jira/$1 [PT]
>>    RewriteLog /var/log/apache2/rewrite.log
>> RewriteLogLevel 9
>>
>>    JkMount /* loadbalancer
>>
>>    ErrorLog /var/log/apache2/jira-error.log
>>    # Possible values include: debug, info, notice, warn, error, crit,
>>
>>    # alert, emerg.
>>
>>    LogLevel warn
>>    CustomLog /var/log/apache2/jira-access.log combined
>>
>> </VirtualHost>
>>
>> Here is the full log in rewrite.log:
>>
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite '/' ->
>> '/jira/'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing '/jira/' to
>> get passed through to next API URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial<http://bugs.epseelon.org/sid#8231258][rid%238430e88/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial<http://bugs.epseelon.org/sid#8231258][rid%23843ceb8/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) init rewrite engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) rewrite
>> '/jira/secure/Setup!default.jspa' ->
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial<http://bugs.epseelon.org/sid#8231258][rid%238432e90/initial>]
>> (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>>
>> I don't really understand why jira is getting redirected to jira/jira
>>
>> 2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>
>>
>>
>>> Sebastien ARBOGAST schrieb:
>>>
>>>
>>>
>>>> Ok, so defining my app as the ROOT one is definitely not an option.Now
>>>> I'm
>>>> sorry to ask but could you be a little more specific about where I need
>>>> to
>>>> add those mod_rewrite configuration bits? Because I'm not really an
>>>> Apache
>>>> configuration wizard and mod_rewrite is especially scary to me.
>>>>
>>>>
>>>>
>>> No Problem.
>>>
>>> 1) Loading the module (assuming httpd 2.0 or 2.2 here)
>>>
>>> You need to add a line of the form
>>>
>>> LoadModule rewrite_module modules/mod_rewrite.so
>>>
>>> to the global part of your configuration. There shoud be already a coupl
>>> of
>>> such LoadModule lines, maybe mod_rewrite is already there. If you are
>>> using
>>> httpd coming via some Linux distro, then you need to find the file, where
>>> your distro handles loading modules. This differs a bit from distro to
>>> distro.
>>>
>>> 2) Connfiguring the RewriteRule in your VirtualHost
>>>
>>> Add the RewriteRule I proposed and also a "RewriteEngine On".
>>>
>>> If you want to check, what the rewriting is doing, also add a
>>>
>>> RewriteLog /some/log/path/rewrite.log
>>> RewriteLogLevel 9
>>>
>>> 9 is very verbose, not for regular production. With 0 you can silence the
>>> file, higher numbers mean more log info.
>>>
>>> If you want to fight against getting scared:
>>>
>>> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>
>>>  2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>>
>>>
>>>>  Hi Sebastien,
>>>>
>>>>
>>>>> Sebastien ARBOGAST schrieb:
>>>>>
>>>>>  I've got my JBoss 4.2 server running and I managed to configure one
>>>>>
>>>>>
>>>>>
>>>>>> virtual
>>>>>> host with mod_jk to get to it without having to enter the 8080
>>>>>> port.Here
>>>>>> is
>>>>>> my VirtualHost configuration:
>>>>>>
>>>>>>
>>>>>> <VirtualHost *:80>
>>>>>>  ServerAdmin sebastien.arbogast@gmail.com
>>>>>>  ServerName myserver.com
>>>>>>
>>>>>>  JkMount /* loadbalancer
>>>>>>
>>>>>>  ErrorLog /var/log/apache2/myserver-error.log
>>>>>>  # Possible values include: debug, info, notice, warn, error, crit,
>>>>>>
>>>>>>  # alert, emerg.
>>>>>>
>>>>>>
>>>>>>  LogLevel warn
>>>>>>  CustomLog /var/log/apache2/myserver-access.log combined
>>>>>>
>>>>>>
>>>>>> </VirtualHost>
>>>>>>
>>>>>>
>>>>>> So no when I access the JIRA application installed on this server, I
>>>>>> can
>>>>>> do
>>>>>> it either from http://myserver.com:8080/jira or from
>>>>>> http://myserver.com/jira
>>>>>> Now I would like to be able to skip the jira suffix and access this
>>>>>> same
>>>>>> application from http://myserver.com, but without making JIRA the
>>>>>> home
>>>>>> application on my JBoss server.
>>>>>>
>>>>>>
>>>>>> Is that possible? How can I do that?
>>>>>>
>>>>>>  Use mod_rewrite in Apache httpd and a configuration similar to:
>>>>>>
>>>>>>
>>>>> RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>>>
>>>>> and
>>>>>
>>>>> JkMount /jira|* loadbalancer
>>>>>
>>>>> (JkMount /* would do it to, but is less precise).
>>>>>
>>>>> If you want mod_jk to act after an internal rewrite, you need to use
>>>>> the
>>>>> "PT" flag in the RewriteRule.
>>>>>
>>>>> If it doesn't work, add a RewriteLog and see, what your RewriteRules
>>>>> are
>>>>> actually doing.
>>>>>
>>>>> A totally different approach would be, to deploy the jira webapp as the
>>>>> so-called ROOT context in Tomcat. Then it would be reachable via
>>>>> http://myserver.com:8080/ and thus also via http://myserver.com/ by
>>>>> the
>>>>> same JkMount /*. Although all applications should be freely eployable
>>>>> under
>>>>> any context name, not all are actually. So you would need to
>>>>> experiment,
>>>>> if
>>>>> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
>>>>> production is not recommendable in general, because if you always
>>>>> deploy
>>>>> your webapps as ROOT, you will no longer be able to share a Tomcat
>>>>> instance
>>>>> for multiple webapps (at least not in the same host), and secondly the
>>>>> ROOT
>>>>> context catches all requests, that do not map to any other webapp, so
>>>>> is
>>>>> generally also a good indicator if something is going wrong.
>>>>>
>>>>> Have fun,
>>>>>
>>>>> Rainer
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Sébastien Arbogast

http://sebastien-arbogast.com

Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Rainer Jung <ra...@kippdata.de>.
David Smith schrieb:
> This added before your RewriteRule prevents requests to /jira/* from 
> being handled by the rewrite rule.  This should break the endless redirect:
> 
> RewriteCond     %{REQUEST_URI}   !^/jira/.*
> 
> --David

Yes, correct, sorry for me being in dummy mode ...

> Sebastien ARBOGAST wrote:
>> Thanks a lot for these precisions. I already had mod_rewrite loaded 
>> but when
>> I configured my VirtualHost like the following, I got a redirect loop 
>> error:
>> <VirtualHost *:80>
>>     ServerAdmin sebastien.arbogast@gmail.com
>>     ServerName bugs.epseelon.org
>>
>>     RewriteEngine On
>>     RewriteRule ^/(.*)$ /jira/$1 [PT]
>>     RewriteLog /var/log/apache2/rewrite.log
>> RewriteLogLevel 9
>>
>>     JkMount /* loadbalancer
>>
>>     ErrorLog /var/log/apache2/jira-error.log
>>     # Possible values include: debug, info, notice, warn, error, crit,
>>
>>     # alert, emerg.
>>
>>     LogLevel warn
>>     CustomLog /var/log/apache2/jira-access.log combined
>>
>> </VirtualHost>
>>
>> Here is the full log in rewrite.log:
>>
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite '/' ->
>> '/jira/'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing 
>> '/jira/' to
>> get passed through to next API URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite 
>> engine
>> with requested uri /jira/secure/Setup!default.jspa
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
>> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
>> '/jira/secure/Setup!default.jspa' -> 
>> '/jira/jira/secure/Setup!default.jspa'
>> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
>> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
>> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
>> URI-to-filename handler
>>
>> I don't really understand why jira is getting redirected to jira/jira
>>
>> 2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>
>>  
>>> Sebastien ARBOGAST schrieb:
>>>
>>>    
>>>> Ok, so defining my app as the ROOT one is definitely not an 
>>>> option.Now I'm
>>>> sorry to ask but could you be a little more specific about where I 
>>>> need to
>>>> add those mod_rewrite configuration bits? Because I'm not really an 
>>>> Apache
>>>> configuration wizard and mod_rewrite is especially scary to me.
>>>>
>>>>       
>>> No Problem.
>>>
>>> 1) Loading the module (assuming httpd 2.0 or 2.2 here)
>>>
>>> You need to add a line of the form
>>>
>>> LoadModule rewrite_module modules/mod_rewrite.so
>>>
>>> to the global part of your configuration. There shoud be already a 
>>> coupl of
>>> such LoadModule lines, maybe mod_rewrite is already there. If you are 
>>> using
>>> httpd coming via some Linux distro, then you need to find the file, 
>>> where
>>> your distro handles loading modules. This differs a bit from distro to
>>> distro.
>>>
>>> 2) Connfiguring the RewriteRule in your VirtualHost
>>>
>>> Add the RewriteRule I proposed and also a "RewriteEngine On".
>>>
>>> If you want to check, what the rewriting is doing, also add a
>>>
>>> RewriteLog /some/log/path/rewrite.log
>>> RewriteLogLevel 9
>>>
>>> 9 is very verbose, not for regular production. With 0 you can silence 
>>> the
>>> file, higher numbers mean more log info.
>>>
>>> If you want to fight against getting scared:
>>>
>>> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>>>
>>>  2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>>    
>>>>  Hi Sebastien,
>>>>      
>>>>> Sebastien ARBOGAST schrieb:
>>>>>
>>>>>  I've got my JBoss 4.2 server running and I managed to configure one
>>>>>
>>>>>        
>>>>>> virtual
>>>>>> host with mod_jk to get to it without having to enter the 8080 
>>>>>> port.Here
>>>>>> is
>>>>>> my VirtualHost configuration:
>>>>>>
>>>>>>
>>>>>> <VirtualHost *:80>
>>>>>>   ServerAdmin sebastien.arbogast@gmail.com
>>>>>>   ServerName myserver.com
>>>>>>
>>>>>>   JkMount /* loadbalancer
>>>>>>
>>>>>>   ErrorLog /var/log/apache2/myserver-error.log
>>>>>>   # Possible values include: debug, info, notice, warn, error, crit,
>>>>>>
>>>>>>   # alert, emerg.
>>>>>>
>>>>>>
>>>>>>   LogLevel warn
>>>>>>   CustomLog /var/log/apache2/myserver-access.log combined
>>>>>>
>>>>>>
>>>>>> </VirtualHost>
>>>>>>
>>>>>>
>>>>>> So no when I access the JIRA application installed on this server, 
>>>>>> I can
>>>>>> do
>>>>>> it either from http://myserver.com:8080/jira or from
>>>>>> http://myserver.com/jira
>>>>>> Now I would like to be able to skip the jira suffix and access 
>>>>>> this same
>>>>>> application from http://myserver.com, but without making JIRA the 
>>>>>> home
>>>>>> application on my JBoss server.
>>>>>>
>>>>>>
>>>>>> Is that possible? How can I do that?
>>>>>>
>>>>>>  Use mod_rewrite in Apache httpd and a configuration similar to:
>>>>>>           
>>>>> RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>>>
>>>>> and
>>>>>
>>>>> JkMount /jira|* loadbalancer
>>>>>
>>>>> (JkMount /* would do it to, but is less precise).
>>>>>
>>>>> If you want mod_jk to act after an internal rewrite, you need to 
>>>>> use the
>>>>> "PT" flag in the RewriteRule.
>>>>>
>>>>> If it doesn't work, add a RewriteLog and see, what your 
>>>>> RewriteRules are
>>>>> actually doing.
>>>>>
>>>>> A totally different approach would be, to deploy the jira webapp as 
>>>>> the
>>>>> so-called ROOT context in Tomcat. Then it would be reachable via
>>>>> http://myserver.com:8080/ and thus also via http://myserver.com/ by 
>>>>> the
>>>>> same JkMount /*. Although all applications should be freely eployable
>>>>> under
>>>>> any context name, not all are actually. So you would need to 
>>>>> experiment,
>>>>> if
>>>>> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
>>>>> production is not recommendable in general, because if you always 
>>>>> deploy
>>>>> your webapps as ROOT, you will no longer be able to share a Tomcat
>>>>> instance
>>>>> for multiple webapps (at least not in the same host), and secondly the
>>>>> ROOT
>>>>> context catches all requests, that do not map to any other webapp, 
>>>>> so is
>>>>> generally also a good indicator if something is going wrong.
>>>>>
>>>>> Have fun,
>>>>>
>>>>> Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by David Smith <dn...@cornell.edu>.
This added before your RewriteRule prevents requests to /jira/* from 
being handled by the rewrite rule.  This should break the endless redirect:

RewriteCond     %{REQUEST_URI}   !^/jira/.*

--David

Sebastien ARBOGAST wrote:
> Thanks a lot for these precisions. I already had mod_rewrite loaded but when
> I configured my VirtualHost like the following, I got a redirect loop error:
> <VirtualHost *:80>
>     ServerAdmin sebastien.arbogast@gmail.com
>     ServerName bugs.epseelon.org
>
>     RewriteEngine On
>     RewriteRule ^/(.*)$ /jira/$1 [PT]
>     RewriteLog /var/log/apache2/rewrite.log
> RewriteLogLevel 9
>
>     JkMount /* loadbalancer
>
>     ErrorLog /var/log/apache2/jira-error.log
>     # Possible values include: debug, info, notice, warn, error, crit,
>
>     # alert, emerg.
>
>     LogLevel warn
>     CustomLog /var/log/apache2/jira-access.log combined
>
> </VirtualHost>
>
> Here is the full log in rewrite.log:
>
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite '/' ->
> '/jira/'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing '/jira/' to
> get passed through to next API URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
> with requested uri /jira/secure/Setup!default.jspa
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
> '^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
> '/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
> 87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
> bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
> '/jira/jira/secure/Setup!default.jspa' to get passed through to next API
> URI-to-filename handler
>
> I don't really understand why jira is getting redirected to jira/jira
>
> 2008/6/22 Rainer Jung <ra...@kippdata.de>:
>
>   
>> Sebastien ARBOGAST schrieb:
>>
>>     
>>> Ok, so defining my app as the ROOT one is definitely not an option.Now I'm
>>> sorry to ask but could you be a little more specific about where I need to
>>> add those mod_rewrite configuration bits? Because I'm not really an Apache
>>> configuration wizard and mod_rewrite is especially scary to me.
>>>
>>>       
>> No Problem.
>>
>> 1) Loading the module (assuming httpd 2.0 or 2.2 here)
>>
>> You need to add a line of the form
>>
>> LoadModule rewrite_module modules/mod_rewrite.so
>>
>> to the global part of your configuration. There shoud be already a coupl of
>> such LoadModule lines, maybe mod_rewrite is already there. If you are using
>> httpd coming via some Linux distro, then you need to find the file, where
>> your distro handles loading modules. This differs a bit from distro to
>> distro.
>>
>> 2) Connfiguring the RewriteRule in your VirtualHost
>>
>> Add the RewriteRule I proposed and also a "RewriteEngine On".
>>
>> If you want to check, what the rewriting is doing, also add a
>>
>> RewriteLog /some/log/path/rewrite.log
>> RewriteLogLevel 9
>>
>> 9 is very verbose, not for regular production. With 0 you can silence the
>> file, higher numbers mean more log info.
>>
>> If you want to fight against getting scared:
>>
>> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
>>
>> Regards,
>>
>> Rainer
>>
>>
>>  2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>     
>>>  Hi Sebastien,
>>>       
>>>> Sebastien ARBOGAST schrieb:
>>>>
>>>>  I've got my JBoss 4.2 server running and I managed to configure one
>>>>
>>>>         
>>>>> virtual
>>>>> host with mod_jk to get to it without having to enter the 8080 port.Here
>>>>> is
>>>>> my VirtualHost configuration:
>>>>>
>>>>>
>>>>> <VirtualHost *:80>
>>>>>   ServerAdmin sebastien.arbogast@gmail.com
>>>>>   ServerName myserver.com
>>>>>
>>>>>   JkMount /* loadbalancer
>>>>>
>>>>>   ErrorLog /var/log/apache2/myserver-error.log
>>>>>   # Possible values include: debug, info, notice, warn, error, crit,
>>>>>
>>>>>   # alert, emerg.
>>>>>
>>>>>
>>>>>   LogLevel warn
>>>>>   CustomLog /var/log/apache2/myserver-access.log combined
>>>>>
>>>>>
>>>>> </VirtualHost>
>>>>>
>>>>>
>>>>> So no when I access the JIRA application installed on this server, I can
>>>>> do
>>>>> it either from http://myserver.com:8080/jira or from
>>>>> http://myserver.com/jira
>>>>> Now I would like to be able to skip the jira suffix and access this same
>>>>> application from http://myserver.com, but without making JIRA the home
>>>>> application on my JBoss server.
>>>>>
>>>>>
>>>>> Is that possible? How can I do that?
>>>>>
>>>>>  Use mod_rewrite in Apache httpd and a configuration similar to:
>>>>>           
>>>> RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>>
>>>> and
>>>>
>>>> JkMount /jira|* loadbalancer
>>>>
>>>> (JkMount /* would do it to, but is less precise).
>>>>
>>>> If you want mod_jk to act after an internal rewrite, you need to use the
>>>> "PT" flag in the RewriteRule.
>>>>
>>>> If it doesn't work, add a RewriteLog and see, what your RewriteRules are
>>>> actually doing.
>>>>
>>>> A totally different approach would be, to deploy the jira webapp as the
>>>> so-called ROOT context in Tomcat. Then it would be reachable via
>>>> http://myserver.com:8080/ and thus also via http://myserver.com/ by the
>>>> same JkMount /*. Although all applications should be freely eployable
>>>> under
>>>> any context name, not all are actually. So you would need to experiment,
>>>> if
>>>> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
>>>> production is not recommendable in general, because if you always deploy
>>>> your webapps as ROOT, you will no longer be able to share a Tomcat
>>>> instance
>>>> for multiple webapps (at least not in the same host), and secondly the
>>>> ROOT
>>>> context catches all requests, that do not map to any other webapp, so is
>>>> generally also a good indicator if something is going wrong.
>>>>
>>>> Have fun,
>>>>
>>>> Rainer
>>>>
>>>>         
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Sebastien ARBOGAST <se...@gmail.com>.
Thanks a lot for these precisions. I already had mod_rewrite loaded but when
I configured my VirtualHost like the following, I got a redirect loop error:
<VirtualHost *:80>
    ServerAdmin sebastien.arbogast@gmail.com
    ServerName bugs.epseelon.org

    RewriteEngine On
    RewriteRule ^/(.*)$ /jira/$1 [PT]
    RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9

    JkMount /* loadbalancer

    ErrorLog /var/log/apache2/jira-error.log
    # Possible values include: debug, info, notice, warn, error, crit,

    # alert, emerg.

    LogLevel warn
    CustomLog /var/log/apache2/jira-access.log combined

</VirtualHost>

Here is the full log in rewrite.log:

87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite '/' ->
'/jira/'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing '/jira/' to
get passed through to next API URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:56 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8430e88/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#843ceb8/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) init rewrite engine
with requested uri /jira/secure/Setup!default.jspa
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (3) applying pattern
'^/(.*)$' to uri '/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) rewrite
'/jira/secure/Setup!default.jspa' -> '/jira/jira/secure/Setup!default.jspa'
87.65.162.6 - - [22/Jun/2008:21:13:57 +0200] [
bugs.epseelon.org/sid#8231258][rid#8432e90/initial] (2) forcing
'/jira/jira/secure/Setup!default.jspa' to get passed through to next API
URI-to-filename handler

I don't really understand why jira is getting redirected to jira/jira

2008/6/22 Rainer Jung <ra...@kippdata.de>:

> Sebastien ARBOGAST schrieb:
>
>> Ok, so defining my app as the ROOT one is definitely not an option.Now I'm
>> sorry to ask but could you be a little more specific about where I need to
>> add those mod_rewrite configuration bits? Because I'm not really an Apache
>> configuration wizard and mod_rewrite is especially scary to me.
>>
>
> No Problem.
>
> 1) Loading the module (assuming httpd 2.0 or 2.2 here)
>
> You need to add a line of the form
>
> LoadModule rewrite_module modules/mod_rewrite.so
>
> to the global part of your configuration. There shoud be already a coupl of
> such LoadModule lines, maybe mod_rewrite is already there. If you are using
> httpd coming via some Linux distro, then you need to find the file, where
> your distro handles loading modules. This differs a bit from distro to
> distro.
>
> 2) Connfiguring the RewriteRule in your VirtualHost
>
> Add the RewriteRule I proposed and also a "RewriteEngine On".
>
> If you want to check, what the rewriting is doing, also add a
>
> RewriteLog /some/log/path/rewrite.log
> RewriteLogLevel 9
>
> 9 is very verbose, not for regular production. With 0 you can silence the
> file, higher numbers mean more log info.
>
> If you want to fight against getting scared:
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
>
> Regards,
>
> Rainer
>
>
>  2008/6/22 Rainer Jung <ra...@kippdata.de>:
>>
>>  Hi Sebastien,
>>>
>>> Sebastien ARBOGAST schrieb:
>>>
>>>  I've got my JBoss 4.2 server running and I managed to configure one
>>>
>>>> virtual
>>>> host with mod_jk to get to it without having to enter the 8080 port.Here
>>>> is
>>>> my VirtualHost configuration:
>>>>
>>>>
>>>> <VirtualHost *:80>
>>>>   ServerAdmin sebastien.arbogast@gmail.com
>>>>   ServerName myserver.com
>>>>
>>>>   JkMount /* loadbalancer
>>>>
>>>>   ErrorLog /var/log/apache2/myserver-error.log
>>>>   # Possible values include: debug, info, notice, warn, error, crit,
>>>>
>>>>   # alert, emerg.
>>>>
>>>>
>>>>   LogLevel warn
>>>>   CustomLog /var/log/apache2/myserver-access.log combined
>>>>
>>>>
>>>> </VirtualHost>
>>>>
>>>>
>>>> So no when I access the JIRA application installed on this server, I can
>>>> do
>>>> it either from http://myserver.com:8080/jira or from
>>>> http://myserver.com/jira
>>>> Now I would like to be able to skip the jira suffix and access this same
>>>> application from http://myserver.com, but without making JIRA the home
>>>> application on my JBoss server.
>>>>
>>>>
>>>> Is that possible? How can I do that?
>>>>
>>>>  Use mod_rewrite in Apache httpd and a configuration similar to:
>>>
>>> RewriteRule ^/(.*)$ /jira/$1 [PT]
>>>
>>> and
>>>
>>> JkMount /jira|* loadbalancer
>>>
>>> (JkMount /* would do it to, but is less precise).
>>>
>>> If you want mod_jk to act after an internal rewrite, you need to use the
>>> "PT" flag in the RewriteRule.
>>>
>>> If it doesn't work, add a RewriteLog and see, what your RewriteRules are
>>> actually doing.
>>>
>>> A totally different approach would be, to deploy the jira webapp as the
>>> so-called ROOT context in Tomcat. Then it would be reachable via
>>> http://myserver.com:8080/ and thus also via http://myserver.com/ by the
>>> same JkMount /*. Although all applications should be freely eployable
>>> under
>>> any context name, not all are actually. So you would need to experiment,
>>> if
>>> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
>>> production is not recommendable in general, because if you always deploy
>>> your webapps as ROOT, you will no longer be able to share a Tomcat
>>> instance
>>> for multiple webapps (at least not in the same host), and secondly the
>>> ROOT
>>> context catches all requests, that do not map to any other webapp, so is
>>> generally also a good indicator if something is going wrong.
>>>
>>> Have fun,
>>>
>>> Rainer
>>>
>>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Sébastien Arbogast

http://sebastien-arbogast.com

Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Rainer Jung <ra...@kippdata.de>.
Sebastien ARBOGAST schrieb:
> Ok, so defining my app as the ROOT one is definitely not an option.Now I'm
> sorry to ask but could you be a little more specific about where I need to
> add those mod_rewrite configuration bits? Because I'm not really an Apache
> configuration wizard and mod_rewrite is especially scary to me.

No Problem.

1) Loading the module (assuming httpd 2.0 or 2.2 here)

You need to add a line of the form

LoadModule rewrite_module modules/mod_rewrite.so

to the global part of your configuration. There shoud be already a coupl 
of such LoadModule lines, maybe mod_rewrite is already there. If you are 
using httpd coming via some Linux distro, then you need to find the 
file, where your distro handles loading modules. This differs a bit from 
distro to distro.

2) Connfiguring the RewriteRule in your VirtualHost

Add the RewriteRule I proposed and also a "RewriteEngine On".

If you want to check, what the rewriting is doing, also add a

RewriteLog /some/log/path/rewrite.log
RewriteLogLevel 9

9 is very verbose, not for regular production. With 0 you can silence 
the file, higher numbers mean more log info.

If you want to fight against getting scared:

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Regards,

Rainer

> 2008/6/22 Rainer Jung <ra...@kippdata.de>:
> 
>> Hi Sebastien,
>>
>> Sebastien ARBOGAST schrieb:
>>
>>  I've got my JBoss 4.2 server running and I managed to configure one
>>> virtual
>>> host with mod_jk to get to it without having to enter the 8080 port.Here
>>> is
>>> my VirtualHost configuration:
>>>
>>>
>>> <VirtualHost *:80>
>>>    ServerAdmin sebastien.arbogast@gmail.com
>>>    ServerName myserver.com
>>>
>>>    JkMount /* loadbalancer
>>>
>>>    ErrorLog /var/log/apache2/myserver-error.log
>>>    # Possible values include: debug, info, notice, warn, error, crit,
>>>
>>>    # alert, emerg.
>>>
>>>
>>>    LogLevel warn
>>>    CustomLog /var/log/apache2/myserver-access.log combined
>>>
>>>
>>> </VirtualHost>
>>>
>>>
>>> So no when I access the JIRA application installed on this server, I can
>>> do
>>> it either from http://myserver.com:8080/jira or from
>>> http://myserver.com/jira
>>> Now I would like to be able to skip the jira suffix and access this same
>>> application from http://myserver.com, but without making JIRA the home
>>> application on my JBoss server.
>>>
>>>
>>> Is that possible? How can I do that?
>>>
>> Use mod_rewrite in Apache httpd and a configuration similar to:
>>
>> RewriteRule ^/(.*)$ /jira/$1 [PT]
>>
>> and
>>
>> JkMount /jira|* loadbalancer
>>
>> (JkMount /* would do it to, but is less precise).
>>
>> If you want mod_jk to act after an internal rewrite, you need to use the
>> "PT" flag in the RewriteRule.
>>
>> If it doesn't work, add a RewriteLog and see, what your RewriteRules are
>> actually doing.
>>
>> A totally different approach would be, to deploy the jira webapp as the
>> so-called ROOT context in Tomcat. Then it would be reachable via
>> http://myserver.com:8080/ and thus also via http://myserver.com/ by the
>> same JkMount /*. Although all applications should be freely eployable under
>> any context name, not all are actually. So you would need to experiment, if
>> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
>> production is not recommendable in general, because if you always deploy
>> your webapps as ROOT, you will no longer be able to share a Tomcat instance
>> for multiple webapps (at least not in the same host), and secondly the ROOT
>> context catches all requests, that do not map to any other webapp, so is
>> generally also a good indicator if something is going wrong.
>>
>> Have fun,
>>
>> Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Sebastien ARBOGAST <se...@gmail.com>.
Ok, so defining my app as the ROOT one is definitely not an option.Now I'm
sorry to ask but could you be a little more specific about where I need to
add those mod_rewrite configuration bits? Because I'm not really an Apache
configuration wizard and mod_rewrite is especially scary to me.

2008/6/22 Rainer Jung <ra...@kippdata.de>:

> Hi Sebastien,
>
> Sebastien ARBOGAST schrieb:
>
>  I've got my JBoss 4.2 server running and I managed to configure one
>> virtual
>> host with mod_jk to get to it without having to enter the 8080 port.Here
>> is
>> my VirtualHost configuration:
>>
>>
>> <VirtualHost *:80>
>>    ServerAdmin sebastien.arbogast@gmail.com
>>    ServerName myserver.com
>>
>>    JkMount /* loadbalancer
>>
>>    ErrorLog /var/log/apache2/myserver-error.log
>>    # Possible values include: debug, info, notice, warn, error, crit,
>>
>>    # alert, emerg.
>>
>>
>>    LogLevel warn
>>    CustomLog /var/log/apache2/myserver-access.log combined
>>
>>
>> </VirtualHost>
>>
>>
>> So no when I access the JIRA application installed on this server, I can
>> do
>> it either from http://myserver.com:8080/jira or from
>> http://myserver.com/jira
>> Now I would like to be able to skip the jira suffix and access this same
>> application from http://myserver.com, but without making JIRA the home
>> application on my JBoss server.
>>
>>
>> Is that possible? How can I do that?
>>
>
> Use mod_rewrite in Apache httpd and a configuration similar to:
>
> RewriteRule ^/(.*)$ /jira/$1 [PT]
>
> and
>
> JkMount /jira|* loadbalancer
>
> (JkMount /* would do it to, but is less precise).
>
> If you want mod_jk to act after an internal rewrite, you need to use the
> "PT" flag in the RewriteRule.
>
> If it doesn't work, add a RewriteLog and see, what your RewriteRules are
> actually doing.
>
> A totally different approach would be, to deploy the jira webapp as the
> so-called ROOT context in Tomcat. Then it would be reachable via
> http://myserver.com:8080/ and thus also via http://myserver.com/ by the
> same JkMount /*. Although all applications should be freely eployable under
> any context name, not all are actually. So you would need to experiment, if
> you can deploy jira as ROOT webapp. Using the ROOT webapp for normal
> production is not recommendable in general, because if you always deploy
> your webapps as ROOT, you will no longer be able to share a Tomcat instance
> for multiple webapps (at least not in the same host), and secondly the ROOT
> context catches all requests, that do not map to any other webapp, so is
> generally also a good indicator if something is going wrong.
>
> Have fun,
>
> Rainer
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Sébastien Arbogast

http://sebastien-arbogast.com

Re: Configuring mod_jk in a virtual host to mount one specific application?

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Sebastien,

Sebastien ARBOGAST schrieb:
> I've got my JBoss 4.2 server running and I managed to configure one virtual
> host with mod_jk to get to it without having to enter the 8080 port.Here is
> my VirtualHost configuration:
> 
> 
> <VirtualHost *:80>
>     ServerAdmin sebastien.arbogast@gmail.com
>     ServerName myserver.com
> 
>     JkMount /* loadbalancer
> 
>     ErrorLog /var/log/apache2/myserver-error.log
>     # Possible values include: debug, info, notice, warn, error, crit,
> 
>     # alert, emerg.
> 
> 
>     LogLevel warn
>     CustomLog /var/log/apache2/myserver-access.log combined
> 
> 
> </VirtualHost>
> 
> 
> So no when I access the JIRA application installed on this server, I can do
> it either from http://myserver.com:8080/jira or from
> http://myserver.com/jira
> Now I would like to be able to skip the jira suffix and access this same
> application from http://myserver.com, but without making JIRA the home
> application on my JBoss server.
> 
> 
> Is that possible? How can I do that?

Use mod_rewrite in Apache httpd and a configuration similar to:

RewriteRule ^/(.*)$ /jira/$1 [PT]

and

JkMount /jira|* loadbalancer

(JkMount /* would do it to, but is less precise).

If you want mod_jk to act after an internal rewrite, you need to use the 
"PT" flag in the RewriteRule.

If it doesn't work, add a RewriteLog and see, what your RewriteRules are 
actually doing.

A totally different approach would be, to deploy the jira webapp as the 
so-called ROOT context in Tomcat. Then it would be reachable via 
http://myserver.com:8080/ and thus also via http://myserver.com/ by the 
same JkMount /*. Although all applications should be freely eployable 
under any context name, not all are actually. So you would need to 
experiment, if you can deploy jira as ROOT webapp. Using the ROOT webapp 
for normal production is not recommendable in general, because if you 
always deploy your webapps as ROOT, you will no longer be able to share 
a Tomcat instance for multiple webapps (at least not in the same host), 
and secondly the ROOT context catches all requests, that do not map to 
any other webapp, so is generally also a good indicator if something is 
going wrong.

Have fun,

Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org