You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by KR <ka...@zimmer428.net> on 2008/05/26 22:14:48 UTC

jspwiki, apache2 reverse proxy, virtual domains - reasonably possible?

Folks;

so far I have enjoyed using JSPWiki internally for being an unobtrusive
piece of software that, once installed, "just works". Right now,
however, after having spent quite an unsuccessful and extremely
unpleasant evening on this, I just wonder whether there's some sort of
documentation on how / whether it is possible to get JSPWiki running in
a tomcat container set up to behave well behind an apache2 reverse proxy
in one of many virtual hosts. So far, I spent some hours both with our
stock 2.4 and with an updated 2.6 installation, playing with various
parameters in jspwiki.properties as well as the apache2 rewriting /
proxy configuration but haven't had too much success so far.

- Generally, I wanted to have all requests to /internal/wiki/
proxy-passed to our internalhost:8080/JSPWiki/ . I have so far barely
given up on that as, no matter what happens, no matter how I set up
JSPWiki (mainly baseURL and referenceStyle), in quite a bunch of
situations (redirect after successful login, redirect after saving
files, ...) the request seems to be redirected to
/JSPWiki/Wiki.jsp?page= ... . Strange, but so far I helped myself making
/JSPWiki available to the outside world on this machine directly, hoping
for the best.

- However, still all is not well. Looking at the redirect behaviour
(mainly following any login and/or save-file-from-editor attempt), it
seems that JSPWiki does not just redirect to an URL having /JSPWiki/...
hardcoded in it but also does redirect to an URL on a wholly different
(non-HTTPS) VirtualHost on the same apache2, which doesn't know about
JSPWiki and, subsequently, makes me end up elsewhere. Strange, as well.

- Overally: I am confused. All I do by now seems trial-and-error as both
some more complex mod_rewrite tricks did fail as well as pretty much
anything including jspwiki.properties configuration. So far it runs on a
non-HTTPS virtual host being directly exposed as JSPWiki, and does more
or less good this way, yet being way off the setup I intended to do. Can
some kind soul out here point me where to have a look to get at least a
clue what could be broken here, and, subsequently, how to get it fixed?

Thanks a bunch in advance, best regards.
Kristian

Re: jspwiki, apache2 reverse proxy, virtual domains - reasonably possible?

Posted by Roger <rx...@gmail.com>.
I had this working once, but don't need it anymore. I did the following:

*** httpd.conf ***

uncomment:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Add:
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

*** Server.xml (Tomcat) ***
<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443"
    proxyName="localhost" proxyPort="80" />

I didn't need to edit the jspwiki.properties afaik, but I might be  
wrong.

Good luck!

Roger


Op 26 mei 2008, om 22:14 heeft KR het volgende geschreven:

> Folks;
>
> so far I have enjoyed using JSPWiki internally for being an  
> unobtrusive
> piece of software that, once installed, "just works". Right now,
> however, after having spent quite an unsuccessful and extremely
> unpleasant evening on this, I just wonder whether there's some sort of
> documentation on how / whether it is possible to get JSPWiki running  
> in
> a tomcat container set up to behave well behind an apache2 reverse  
> proxy
> in one of many virtual hosts. So far, I spent some hours both with our
> stock 2.4 and with an updated 2.6 installation, playing with various
> parameters in jspwiki.properties as well as the apache2 rewriting /
> proxy configuration but haven't had too much success so far.
>
> - Generally, I wanted to have all requests to /internal/wiki/
> proxy-passed to our internalhost:8080/JSPWiki/ . I have so far barely
> given up on that as, no matter what happens, no matter how I set up
> JSPWiki (mainly baseURL and referenceStyle), in quite a bunch of
> situations (redirect after successful login, redirect after saving
> files, ...) the request seems to be redirected to
> /JSPWiki/Wiki.jsp?page= ... . Strange, but so far I helped myself  
> making
> /JSPWiki available to the outside world on this machine directly,  
> hoping
> for the best.
>
> - However, still all is not well. Looking at the redirect behaviour
> (mainly following any login and/or save-file-from-editor attempt), it
> seems that JSPWiki does not just redirect to an URL having / 
> JSPWiki/...
> hardcoded in it but also does redirect to an URL on a wholly different
> (non-HTTPS) VirtualHost on the same apache2, which doesn't know about
> JSPWiki and, subsequently, makes me end up elsewhere. Strange, as  
> well.
>
> - Overally: I am confused. All I do by now seems trial-and-error as  
> both
> some more complex mod_rewrite tricks did fail as well as pretty much
> anything including jspwiki.properties configuration. So far it runs  
> on a
> non-HTTPS virtual host being directly exposed as JSPWiki, and does  
> more
> or less good this way, yet being way off the setup I intended to do.  
> Can
> some kind soul out here point me where to have a look to get at  
> least a
> clue what could be broken here, and, subsequently, how to get it  
> fixed?
>
> Thanks a bunch in advance, best regards.
> Kristian


Re: jspwiki, apache2 reverse proxy, virtual domains - reasonably possible?

Posted by KR <ka...@zimmer428.net>.
Janne Jalkanen schrieb:
> 
> Do you absolutely need proxypass?  The way I do it is that I use
> mod_jk...  And you should be able to use mod_proxy for newer Apaches.

Well we actually make use of ProxPass/-Reverse because asides the tomcat
on our dev environment we mainly make use of glassfish application
server connected via "arbitrary" HTTP proxying so mod_jk is no option
here. However I doubt using the mod_jk connector over mod_proxy will
address issues like those I mentioned (redirecting to a "wrong" URL path
in a different virtual host i.e. while not paying attention to HTTP(S)
protocol schemes)? Am I missing something here? :)

Thanks a bunch for your hint nevertheless, best regards,
Kristian

Re: jspwiki, apache2 reverse proxy, virtual domains - reasonably possible?

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Do you absolutely need proxypass?  The way I do it is that I use  
mod_jk...  And you should be able to use mod_proxy for newer Apaches.

/Janne

On 26 May 2008, at 23:14, KR wrote:

> Folks;
>
> so far I have enjoyed using JSPWiki internally for being an  
> unobtrusive
> piece of software that, once installed, "just works". Right now,
> however, after having spent quite an unsuccessful and extremely
> unpleasant evening on this, I just wonder whether there's some sort of
> documentation on how / whether it is possible to get JSPWiki  
> running in
> a tomcat container set up to behave well behind an apache2 reverse  
> proxy
> in one of many virtual hosts. So far, I spent some hours both with our
> stock 2.4 and with an updated 2.6 installation, playing with various
> parameters in jspwiki.properties as well as the apache2 rewriting /
> proxy configuration but haven't had too much success so far.
>
> - Generally, I wanted to have all requests to /internal/wiki/
> proxy-passed to our internalhost:8080/JSPWiki/ . I have so far barely
> given up on that as, no matter what happens, no matter how I set up
> JSPWiki (mainly baseURL and referenceStyle), in quite a bunch of
> situations (redirect after successful login, redirect after saving
> files, ...) the request seems to be redirected to
> /JSPWiki/Wiki.jsp?page= ... . Strange, but so far I helped myself  
> making
> /JSPWiki available to the outside world on this machine directly,  
> hoping
> for the best.
>
> - However, still all is not well. Looking at the redirect behaviour
> (mainly following any login and/or save-file-from-editor attempt), it
> seems that JSPWiki does not just redirect to an URL having / 
> JSPWiki/...
> hardcoded in it but also does redirect to an URL on a wholly different
> (non-HTTPS) VirtualHost on the same apache2, which doesn't know about
> JSPWiki and, subsequently, makes me end up elsewhere. Strange, as  
> well.
>
> - Overally: I am confused. All I do by now seems trial-and-error as  
> both
> some more complex mod_rewrite tricks did fail as well as pretty much
> anything including jspwiki.properties configuration. So far it runs  
> on a
> non-HTTPS virtual host being directly exposed as JSPWiki, and does  
> more
> or less good this way, yet being way off the setup I intended to  
> do. Can
> some kind soul out here point me where to have a look to get at  
> least a
> clue what could be broken here, and, subsequently, how to get it  
> fixed?
>
> Thanks a bunch in advance, best regards.
> Kristian


Re: jspwiki, apache2 reverse proxy, virtual domains - reasonably possible?

Posted by Harry Metske <ha...@gmail.com>.
Kristian,

I also don't have a direct answer to your question, but I'm using the
following configuration:

apache conf:
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
ProxyPass /JSPWiki ajp://localhost:8009/JSPWiki

Tomcat's server.xml:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

using the ajp proxy has the advantage that you still have the original
client IP address in Tomcat, if you use http proxy you loose that

regards,
Harry Metske

2008/5/26 KR <ka...@zimmer428.net>:

> Folks;
>
> so far I have enjoyed using JSPWiki internally for being an unobtrusive
> piece of software that, once installed, "just works". Right now,
> however, after having spent quite an unsuccessful and extremely
> unpleasant evening on this, I just wonder whether there's some sort of
> documentation on how / whether it is possible to get JSPWiki running in
> a tomcat container set up to behave well behind an apache2 reverse proxy
> in one of many virtual hosts. So far, I spent some hours both with our
> stock 2.4 and with an updated 2.6 installation, playing with various
> parameters in jspwiki.properties as well as the apache2 rewriting /
> proxy configuration but haven't had too much success so far.
>
> - Generally, I wanted to have all requests to /internal/wiki/
> proxy-passed to our internalhost:8080/JSPWiki/ . I have so far barely
> given up on that as, no matter what happens, no matter how I set up
> JSPWiki (mainly baseURL and referenceStyle), in quite a bunch of
> situations (redirect after successful login, redirect after saving
> files, ...) the request seems to be redirected to
> /JSPWiki/Wiki.jsp?page= ... . Strange, but so far I helped myself making
> /JSPWiki available to the outside world on this machine directly, hoping
> for the best.
>
> - However, still all is not well. Looking at the redirect behaviour
> (mainly following any login and/or save-file-from-editor attempt), it
> seems that JSPWiki does not just redirect to an URL having /JSPWiki/...
> hardcoded in it but also does redirect to an URL on a wholly different
> (non-HTTPS) VirtualHost on the same apache2, which doesn't know about
> JSPWiki and, subsequently, makes me end up elsewhere. Strange, as well.
>
> - Overally: I am confused. All I do by now seems trial-and-error as both
> some more complex mod_rewrite tricks did fail as well as pretty much
> anything including jspwiki.properties configuration. So far it runs on a
> non-HTTPS virtual host being directly exposed as JSPWiki, and does more
> or less good this way, yet being way off the setup I intended to do. Can
> some kind soul out here point me where to have a look to get at least a
> clue what could be broken here, and, subsequently, how to get it fixed?
>
> Thanks a bunch in advance, best regards.
> Kristian
>



-- 
met vriendelijke groet,
Harry Metske
Telnr. +31-548-512395
Mobile +31-6-51898081