You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sergey Podatelev <br...@gmail.com> on 2009/07/02 20:27:19 UTC

Wicket behind proxy (AJP)

Hello,

I know this question had already been asked here, but I still couldn't
get it working on my side.
What I'm trying to achieve, is a configuration of Wicket running as
filter on Tomcat with an Apache host as a frontend. Particular problem
is with the context path.

Here's my configuration:
Tomcat's "server.xml":

...
<Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
enableLookups="false" />
...

Apache's "sites-enabled/mysite":

...
<VirtualHost 127.0.0.1:80>
  ServerName "mysite"
  <IfModule mod_proxy.c>
    ProxyRequests Off
    <Proxy *>
      Order deny,allow
      Deny from all
      Allow from localhost
    </Proxy>

    ProxyPass        / http://localhost:8084/Mysite/
    ProxyPassReverse / http://localhost:8084/Mysite/

    # this doesn't work
    #ProxyPass        / ajp://localhost:8099/Mysite/
    #ProxyPassReverse / ajp://localhost:8099/Mysite/

    # this doesn't work either
    #ProxyPass        / ajp://localhost:8099/Mysite/
    #ProxyPassReverse / http://localhost:8084/Mysite/

    ProxyPassReverseCookiePath /Mysite /
  </IfModule>
</VirtualHost>
...

The only way I got it working with (almost) no issues is the first
one, where both ProxyPass and ProxyPassReverse directives use HTTP
protocol.
If I try AJP for both, or, as was stated somewhere in the mailing list
here, HTTP for ProxyPassReverse and AJP for ProxyPass.

The specific problem is when I access http://mysite/, some Wicket
requests work fine, some, however, are pointing to
http://mysite/Mysite/ (this, for instance, happens when I do
setResponsePage(Page.class, pageParameters). At first, this doesn't
seem to affect anything, but I have "Infinite Redirect Loop" error on
404 page, which is mounted the way it's described on Wicket's wiki.

I'm not sure, whose problem is this, Wicket's or AJP's.
I'm sure someone had similar issues and got them solved, I'd really
appreciate any comments.

-- 
sp

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Wicket behind proxy (AJP)

Posted by Russell Simpkins <ru...@hotmail.com>.
> From: jcarman@carmanconsulting.com
> Date: Thu, 2 Jul 2009 14:43:59 -0400
> Subject: Re: Wicket behind proxy (AJP)
> To: users@wicket.apache.org
> 
> I don't think ProxyPass supports the "/" path, does it?  At least, it didn't
> back when I wanted to set my site up like that.  What I had to do was put a
> dummy HTML page in there with a refresh directive to make it go to:
> http://mysite/mywicketapp

ProxyPass supports the /, but it doesn't pass to tomcat very well when you go to /. Tomcat will get the request for / through proxy pass, but it gets filtered through the default lookup which seems to only look at files and does NOT create a request to your servlet. In my case I want all requests to go through Spring at *.htm and there is no physical JSP mapped, so it only looks at files on disk.
I would love to hear an easy solution. I guess you could create a single JSP that forward the request.
Russ
_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

Re: Wicket behind proxy (AJP)

Posted by Sergey Podatelev <br...@gmail.com>.
This doesn't sound like a very smooth way (:
And as I said, it all works perfectly well with HTTP but not with AJP.

On Thu, Jul 2, 2009 at 10:43 PM, James
Carman<jc...@carmanconsulting.com> wrote:
> I don't think ProxyPass supports the "/" path, does it?  At least, it didn't
> back when I wanted to set my site up like that.  What I had to do was put a
> dummy HTML page in there with a refresh directive to make it go to:
> http://mysite/mywicketapp
>
> On Thu, Jul 2, 2009 at 2:27 PM, Sergey Podatelev <brightnesslevels@gmail.com
>> wrote:
>
>> Hello,
>>
>> I know this question had already been asked here, but I still couldn't
>> get it working on my side.
>> What I'm trying to achieve, is a configuration of Wicket running as
>> filter on Tomcat with an Apache host as a frontend. Particular problem
>> is with the context path.
>>
>> Here's my configuration:
>> Tomcat's "server.xml":
>>
>> ...
>> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
>> enableLookups="false" />
>> ...
>>
>> Apache's "sites-enabled/mysite":
>>
>> ...
>> <VirtualHost 127.0.0.1:80>
>>  ServerName "mysite"
>>  <IfModule mod_proxy.c>
>>    ProxyRequests Off
>>    <Proxy *>
>>      Order deny,allow
>>      Deny from all
>>      Allow from localhost
>>    </Proxy>
>>
>>    ProxyPass        / http://localhost:8084/Mysite/
>>    ProxyPassReverse / http://localhost:8084/Mysite/
>>
>>    # this doesn't work
>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>    #ProxyPassReverse / ajp://localhost:8099/Mysite/
>>
>>    # this doesn't work either
>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>    #ProxyPassReverse / http://localhost:8084/Mysite/
>>
>>    ProxyPassReverseCookiePath /Mysite /
>>  </IfModule>
>> </VirtualHost>
>> ...
>>
>> The only way I got it working with (almost) no issues is the first
>> one, where both ProxyPass and ProxyPassReverse directives use HTTP
>> protocol.
>> If I try AJP for both, or, as was stated somewhere in the mailing list
>> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>>
>> The specific problem is when I access http://mysite/, some Wicket
>> requests work fine, some, however, are pointing to
>> http://mysite/Mysite/ (this, for instance, happens when I do
>> setResponsePage(Page.class, pageParameters). At first, this doesn't
>> seem to affect anything, but I have "Infinite Redirect Loop" error on
>> 404 page, which is mounted the way it's described on Wicket's wiki.
>>
>> I'm not sure, whose problem is this, Wicket's or AJP's.
>> I'm sure someone had similar issues and got them solved, I'd really
>> appreciate any comments.
>>
>> --
>> sp
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>



-- 
sp

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket behind proxy (AJP)

Posted by James Carman <jc...@carmanconsulting.com>.
I don't think ProxyPass supports the "/" path, does it?  At least, it didn't
back when I wanted to set my site up like that.  What I had to do was put a
dummy HTML page in there with a refresh directive to make it go to:
http://mysite/mywicketapp

On Thu, Jul 2, 2009 at 2:27 PM, Sergey Podatelev <brightnesslevels@gmail.com
> wrote:

> Hello,
>
> I know this question had already been asked here, but I still couldn't
> get it working on my side.
> What I'm trying to achieve, is a configuration of Wicket running as
> filter on Tomcat with an Apache host as a frontend. Particular problem
> is with the context path.
>
> Here's my configuration:
> Tomcat's "server.xml":
>
> ...
> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
> enableLookups="false" />
> ...
>
> Apache's "sites-enabled/mysite":
>
> ...
> <VirtualHost 127.0.0.1:80>
>  ServerName "mysite"
>  <IfModule mod_proxy.c>
>    ProxyRequests Off
>    <Proxy *>
>      Order deny,allow
>      Deny from all
>      Allow from localhost
>    </Proxy>
>
>    ProxyPass        / http://localhost:8084/Mysite/
>    ProxyPassReverse / http://localhost:8084/Mysite/
>
>    # this doesn't work
>    #ProxyPass        / ajp://localhost:8099/Mysite/
>    #ProxyPassReverse / ajp://localhost:8099/Mysite/
>
>    # this doesn't work either
>    #ProxyPass        / ajp://localhost:8099/Mysite/
>    #ProxyPassReverse / http://localhost:8084/Mysite/
>
>    ProxyPassReverseCookiePath /Mysite /
>  </IfModule>
> </VirtualHost>
> ...
>
> The only way I got it working with (almost) no issues is the first
> one, where both ProxyPass and ProxyPassReverse directives use HTTP
> protocol.
> If I try AJP for both, or, as was stated somewhere in the mailing list
> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>
> The specific problem is when I access http://mysite/, some Wicket
> requests work fine, some, however, are pointing to
> http://mysite/Mysite/ (this, for instance, happens when I do
> setResponsePage(Page.class, pageParameters). At first, this doesn't
> seem to affect anything, but I have "Infinite Redirect Loop" error on
> 404 page, which is mounted the way it's described on Wicket's wiki.
>
> I'm not sure, whose problem is this, Wicket's or AJP's.
> I'm sure someone had similar issues and got them solved, I'd really
> appreciate any comments.
>
> --
> sp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket behind proxy (AJP)

Posted by Anton Veretennikov <an...@gmail.com>.
Sergey,

RewriteRule is not a magic. I checked seveal methods but this one is
at least working.

But if you have only one application, you can replace ROOT app with it
then configuration will be:

#for ROOT app:
<VirtualHost *:80>
  ServerName www.sitename.ru
  ServerAlias sitename.ru
  ProxyPass / ajp://127.0.0.1:8009/
  ProxyPassReverse / ajp://127.0.0.1:8009/
</VirtualHost>

-- Tony

On Sat, Jul 4, 2009 at 2:59 PM, Sergey
Podatelev<br...@gmail.com> wrote:
> Thanks for all the feedback.
> I see that there is no "pure" solution by far, I have to try either
> with Tomcat's virtual server's or with the RewriteRule.
>
> Anton, I wish I could, but unfortunately, I've almost no spare time these days.
> Also, I'm far from being a Wicket expert, you can clarify this by
> looking up questions I've been asking in this list (:
>
> On Fri, Jul 3, 2009 at 5:19 PM, Anton
> Veretennikov<an...@gmail.com> wrote:
>> Hello, Sergey,
>>
>> May be this is not a nice solution, but I could solve this problem
>> only by using RewriteRule as follows:
>>
>> <VirtualHost *:80>
>>  ServerName www.sitename.ru
>>  ServerAlias sitename.ru
>>  ProxyPass / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
>>  ProxyPassReverse / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
>>  ProxyPassReverseCookieDomain    localhost  sitename.ru
>>  ProxyPassReverseCookiePath /SiteApp-1.0-SNAPSHOT /
>>  RewriteEngine  on
>>  RewriteRule    ^/SiteApp-1\.0-SNAPSHOT/(.*)$  /$1  [R]
>> </VirtualHost>
>>
>> -- Tony
>>
>> P.S. By the way if you are Russian and have time to help me with
>> wicket.ru site I would appreciate it.
>>
>>
>>
>>
>>
>>
>> On Fri, Jul 3, 2009 at 3:41 PM, Marc Ende<ml...@e-beyond.de> wrote:
>>> Hello Sergey,
>>>
>>> I had the same problems  but I solved them using the virtual-host-feature of
>>> tomcat.
>>>
>>> After that the ProxyPass looks very easy:
>>> <VirtualHost...>
>>> ...
>>> ProxyPass / ajp://localhost/
>>> ...
>>> </VirtualHost>
>>>
>>> yours
>>>
>>> marc
>>>
>>> Sergey Podatelev schrieb:
>>>>
>>>> Hello,
>>>>
>>>> I know this question had already been asked here, but I still couldn't
>>>> get it working on my side.
>>>> What I'm trying to achieve, is a configuration of Wicket running as
>>>> filter on Tomcat with an Apache host as a frontend. Particular problem
>>>> is with the context path.
>>>>
>>>> Here's my configuration:
>>>> Tomcat's "server.xml":
>>>>
>>>> ...
>>>> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
>>>> enableLookups="false" />
>>>> ...
>>>>
>>>> Apache's "sites-enabled/mysite":
>>>>
>>>> ...
>>>> <VirtualHost 127.0.0.1:80>
>>>>  ServerName "mysite"
>>>>  <IfModule mod_proxy.c>
>>>>    ProxyRequests Off
>>>>    <Proxy *>
>>>>      Order deny,allow
>>>>      Deny from all
>>>>      Allow from localhost
>>>>    </Proxy>
>>>>
>>>>    ProxyPass        / http://localhost:8084/Mysite/
>>>>    ProxyPassReverse / http://localhost:8084/Mysite/
>>>>
>>>>    # this doesn't work
>>>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>>>    #ProxyPassReverse / ajp://localhost:8099/Mysite/
>>>>
>>>>    # this doesn't work either
>>>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>>>    #ProxyPassReverse / http://localhost:8084/Mysite/
>>>>
>>>>    ProxyPassReverseCookiePath /Mysite /
>>>>  </IfModule>
>>>> </VirtualHost>
>>>> ...
>>>>
>>>> The only way I got it working with (almost) no issues is the first
>>>> one, where both ProxyPass and ProxyPassReverse directives use HTTP
>>>> protocol.
>>>> If I try AJP for both, or, as was stated somewhere in the mailing list
>>>> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>>>>
>>>> The specific problem is when I access http://mysite/, some Wicket
>>>> requests work fine, some, however, are pointing to
>>>> http://mysite/Mysite/ (this, for instance, happens when I do
>>>> setResponsePage(Page.class, pageParameters). At first, this doesn't
>>>> seem to affect anything, but I have "Infinite Redirect Loop" error on
>>>> 404 page, which is mounted the way it's described on Wicket's wiki.
>>>>
>>>> I'm not sure, whose problem is this, Wicket's or AJP's.
>>>> I'm sure someone had similar issues and got them solved, I'd really
>>>> appreciate any comments.
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> sp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket behind proxy (AJP)

Posted by Sergey Podatelev <br...@gmail.com>.
Thanks for all the feedback.
I see that there is no "pure" solution by far, I have to try either
with Tomcat's virtual server's or with the RewriteRule.

Anton, I wish I could, but unfortunately, I've almost no spare time these days.
Also, I'm far from being a Wicket expert, you can clarify this by
looking up questions I've been asking in this list (:

On Fri, Jul 3, 2009 at 5:19 PM, Anton
Veretennikov<an...@gmail.com> wrote:
> Hello, Sergey,
>
> May be this is not a nice solution, but I could solve this problem
> only by using RewriteRule as follows:
>
> <VirtualHost *:80>
>  ServerName www.sitename.ru
>  ServerAlias sitename.ru
>  ProxyPass / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
>  ProxyPassReverse / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
>  ProxyPassReverseCookieDomain    localhost  sitename.ru
>  ProxyPassReverseCookiePath /SiteApp-1.0-SNAPSHOT /
>  RewriteEngine  on
>  RewriteRule    ^/SiteApp-1\.0-SNAPSHOT/(.*)$  /$1  [R]
> </VirtualHost>
>
> -- Tony
>
> P.S. By the way if you are Russian and have time to help me with
> wicket.ru site I would appreciate it.
>
>
>
>
>
>
> On Fri, Jul 3, 2009 at 3:41 PM, Marc Ende<ml...@e-beyond.de> wrote:
>> Hello Sergey,
>>
>> I had the same problems  but I solved them using the virtual-host-feature of
>> tomcat.
>>
>> After that the ProxyPass looks very easy:
>> <VirtualHost...>
>> ...
>> ProxyPass / ajp://localhost/
>> ...
>> </VirtualHost>
>>
>> yours
>>
>> marc
>>
>> Sergey Podatelev schrieb:
>>>
>>> Hello,
>>>
>>> I know this question had already been asked here, but I still couldn't
>>> get it working on my side.
>>> What I'm trying to achieve, is a configuration of Wicket running as
>>> filter on Tomcat with an Apache host as a frontend. Particular problem
>>> is with the context path.
>>>
>>> Here's my configuration:
>>> Tomcat's "server.xml":
>>>
>>> ...
>>> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
>>> enableLookups="false" />
>>> ...
>>>
>>> Apache's "sites-enabled/mysite":
>>>
>>> ...
>>> <VirtualHost 127.0.0.1:80>
>>>  ServerName "mysite"
>>>  <IfModule mod_proxy.c>
>>>    ProxyRequests Off
>>>    <Proxy *>
>>>      Order deny,allow
>>>      Deny from all
>>>      Allow from localhost
>>>    </Proxy>
>>>
>>>    ProxyPass        / http://localhost:8084/Mysite/
>>>    ProxyPassReverse / http://localhost:8084/Mysite/
>>>
>>>    # this doesn't work
>>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>>    #ProxyPassReverse / ajp://localhost:8099/Mysite/
>>>
>>>    # this doesn't work either
>>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>>    #ProxyPassReverse / http://localhost:8084/Mysite/
>>>
>>>    ProxyPassReverseCookiePath /Mysite /
>>>  </IfModule>
>>> </VirtualHost>
>>> ...
>>>
>>> The only way I got it working with (almost) no issues is the first
>>> one, where both ProxyPass and ProxyPassReverse directives use HTTP
>>> protocol.
>>> If I try AJP for both, or, as was stated somewhere in the mailing list
>>> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>>>
>>> The specific problem is when I access http://mysite/, some Wicket
>>> requests work fine, some, however, are pointing to
>>> http://mysite/Mysite/ (this, for instance, happens when I do
>>> setResponsePage(Page.class, pageParameters). At first, this doesn't
>>> seem to affect anything, but I have "Infinite Redirect Loop" error on
>>> 404 page, which is mounted the way it's described on Wicket's wiki.
>>>
>>> I'm not sure, whose problem is this, Wicket's or AJP's.
>>> I'm sure someone had similar issues and got them solved, I'd really
>>> appreciate any comments.
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
sp

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket behind proxy (AJP)

Posted by Anton Veretennikov <an...@gmail.com>.
Hello, Sergey,

May be this is not a nice solution, but I could solve this problem
only by using RewriteRule as follows:

<VirtualHost *:80>
  ServerName www.sitename.ru
  ServerAlias sitename.ru
  ProxyPass / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
  ProxyPassReverse / ajp://127.0.0.1:8009/SiteApp-1.0-SNAPSHOT/
  ProxyPassReverseCookieDomain    localhost  sitename.ru
  ProxyPassReverseCookiePath /SiteApp-1.0-SNAPSHOT /
  RewriteEngine  on
  RewriteRule    ^/SiteApp-1\.0-SNAPSHOT/(.*)$  /$1  [R]
</VirtualHost>

-- Tony

P.S. By the way if you are Russian and have time to help me with
wicket.ru site I would appreciate it.






On Fri, Jul 3, 2009 at 3:41 PM, Marc Ende<ml...@e-beyond.de> wrote:
> Hello Sergey,
>
> I had the same problems  but I solved them using the virtual-host-feature of
> tomcat.
>
> After that the ProxyPass looks very easy:
> <VirtualHost...>
> ...
> ProxyPass / ajp://localhost/
> ...
> </VirtualHost>
>
> yours
>
> marc
>
> Sergey Podatelev schrieb:
>>
>> Hello,
>>
>> I know this question had already been asked here, but I still couldn't
>> get it working on my side.
>> What I'm trying to achieve, is a configuration of Wicket running as
>> filter on Tomcat with an Apache host as a frontend. Particular problem
>> is with the context path.
>>
>> Here's my configuration:
>> Tomcat's "server.xml":
>>
>> ...
>> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
>> enableLookups="false" />
>> ...
>>
>> Apache's "sites-enabled/mysite":
>>
>> ...
>> <VirtualHost 127.0.0.1:80>
>>  ServerName "mysite"
>>  <IfModule mod_proxy.c>
>>    ProxyRequests Off
>>    <Proxy *>
>>      Order deny,allow
>>      Deny from all
>>      Allow from localhost
>>    </Proxy>
>>
>>    ProxyPass        / http://localhost:8084/Mysite/
>>    ProxyPassReverse / http://localhost:8084/Mysite/
>>
>>    # this doesn't work
>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>    #ProxyPassReverse / ajp://localhost:8099/Mysite/
>>
>>    # this doesn't work either
>>    #ProxyPass        / ajp://localhost:8099/Mysite/
>>    #ProxyPassReverse / http://localhost:8084/Mysite/
>>
>>    ProxyPassReverseCookiePath /Mysite /
>>  </IfModule>
>> </VirtualHost>
>> ...
>>
>> The only way I got it working with (almost) no issues is the first
>> one, where both ProxyPass and ProxyPassReverse directives use HTTP
>> protocol.
>> If I try AJP for both, or, as was stated somewhere in the mailing list
>> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>>
>> The specific problem is when I access http://mysite/, some Wicket
>> requests work fine, some, however, are pointing to
>> http://mysite/Mysite/ (this, for instance, happens when I do
>> setResponsePage(Page.class, pageParameters). At first, this doesn't
>> seem to affect anything, but I have "Infinite Redirect Loop" error on
>> 404 page, which is mounted the way it's described on Wicket's wiki.
>>
>> I'm not sure, whose problem is this, Wicket's or AJP's.
>> I'm sure someone had similar issues and got them solved, I'd really
>> appreciate any comments.
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket behind proxy (AJP)

Posted by Marc Ende <ml...@e-beyond.de>.
Hello Sergey,

I had the same problems  but I solved them using the 
virtual-host-feature of tomcat.

After that the ProxyPass looks very easy:
<VirtualHost...>
...
ProxyPass / ajp://localhost/
...
</VirtualHost>

yours

marc

Sergey Podatelev schrieb:
> Hello,
>
> I know this question had already been asked here, but I still couldn't
> get it working on my side.
> What I'm trying to achieve, is a configuration of Wicket running as
> filter on Tomcat with an Apache host as a frontend. Particular problem
> is with the context path.
>
> Here's my configuration:
> Tomcat's "server.xml":
>
> ...
> <Connector port="8099" protocol="AJP/1.3" redirectPort="8443"
> enableLookups="false" />
> ...
>
> Apache's "sites-enabled/mysite":
>
> ...
> <VirtualHost 127.0.0.1:80>
>   ServerName "mysite"
>   <IfModule mod_proxy.c>
>     ProxyRequests Off
>     <Proxy *>
>       Order deny,allow
>       Deny from all
>       Allow from localhost
>     </Proxy>
>
>     ProxyPass        / http://localhost:8084/Mysite/
>     ProxyPassReverse / http://localhost:8084/Mysite/
>
>     # this doesn't work
>     #ProxyPass        / ajp://localhost:8099/Mysite/
>     #ProxyPassReverse / ajp://localhost:8099/Mysite/
>
>     # this doesn't work either
>     #ProxyPass        / ajp://localhost:8099/Mysite/
>     #ProxyPassReverse / http://localhost:8084/Mysite/
>
>     ProxyPassReverseCookiePath /Mysite /
>   </IfModule>
> </VirtualHost>
> ...
>
> The only way I got it working with (almost) no issues is the first
> one, where both ProxyPass and ProxyPassReverse directives use HTTP
> protocol.
> If I try AJP for both, or, as was stated somewhere in the mailing list
> here, HTTP for ProxyPassReverse and AJP for ProxyPass.
>
> The specific problem is when I access http://mysite/, some Wicket
> requests work fine, some, however, are pointing to
> http://mysite/Mysite/ (this, for instance, happens when I do
> setResponsePage(Page.class, pageParameters). At first, this doesn't
> seem to affect anything, but I have "Infinite Redirect Loop" error on
> 404 page, which is mounted the way it's described on Wicket's wiki.
>
> I'm not sure, whose problem is this, Wicket's or AJP's.
> I'm sure someone had similar issues and got them solved, I'd really
> appreciate any comments.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org