Re: Wicket behind proxy (AJP)

2009-07-04 Thread Anton Veretennikov
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:

  ServerName www.sitename.ru
  ServerAlias sitename.ru
  ProxyPass / ajp://127.0.0.1:8009/
  ProxyPassReverse / ajp://127.0.0.1:8009/


-- Tony

On Sat, Jul 4, 2009 at 2:59 PM, Sergey
Podatelev 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 wrote:
>> Hello, Sergey,
>>
>> May be this is not a nice solution, but I could solve this problem
>> only by using RewriteRule as follows:
>>
>> 
>>  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]
>> 
>>
>> -- 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 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:
>>> 
>>> ...
>>> ProxyPass / ajp://localhost/
>>> ...
>>> 
>>>
>>> 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":

 ...
 >>> enableLookups="false" />
 ...

 Apache's "sites-enabled/mysite":

 ...
 
  ServerName "mysite"
  
    ProxyRequests Off
    
      Order deny,allow
      Deny from all
      Allow from localhost
    

    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 /
  
 
 ...

 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-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> sp
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Wicket behind proxy (AJP)

2009-07-04 Thread Sergey Podatelev
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 wrote:
> Hello, Sergey,
>
> May be this is not a nice solution, but I could solve this problem
> only by using RewriteRule as follows:
>
> 
>  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]
> 
>
> -- 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 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:
>> 
>> ...
>> ProxyPass / ajp://localhost/
>> ...
>> 
>>
>> 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":
>>>
>>> ...
>>> >> enableLookups="false" />
>>> ...
>>>
>>> Apache's "sites-enabled/mysite":
>>>
>>> ...
>>> 
>>>  ServerName "mysite"
>>>  
>>>    ProxyRequests Off
>>>    
>>>      Order deny,allow
>>>      Deny from all
>>>      Allow from localhost
>>>    
>>>
>>>    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 /
>>>  
>>> 
>>> ...
>>>
>>> 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-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
sp

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



Re: Wicket behind proxy (AJP)

2009-07-03 Thread Anton Veretennikov
Hello, Sergey,

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


  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/
  ProxyPassReverseCookieDomainlocalhost  sitename.ru
  ProxyPassReverseCookiePath /SiteApp-1.0-SNAPSHOT /
  RewriteEngine  on
  RewriteRule^/SiteApp-1\.0-SNAPSHOT/(.*)$  /$1  [R]


-- 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 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:
> 
> ...
> ProxyPass / ajp://localhost/
> ...
> 
>
> 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":
>>
>> ...
>> > enableLookups="false" />
>> ...
>>
>> Apache's "sites-enabled/mysite":
>>
>> ...
>> 
>>  ServerName "mysite"
>>  
>>    ProxyRequests Off
>>    
>>      Order deny,allow
>>      Deny from all
>>      Allow from localhost
>>    
>>
>>    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 /
>>  
>> 
>> ...
>>
>> 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-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Wicket behind proxy (AJP)

2009-07-03 Thread Marc Ende

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:

...
ProxyPass / ajp://localhost/
...


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":

...

...

Apache's "sites-enabled/mysite":

...

  ServerName "mysite"
  
ProxyRequests Off

  Order deny,allow
  Deny from all
  Allow from localhost


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 /
  

...

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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Wicket behind proxy (AJP)

2009-07-02 Thread Russell Simpkins

> From: jcar...@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)

2009-07-02 Thread Sergey Podatelev
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 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 > 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":
>>
>> ...
>> > enableLookups="false" />
>> ...
>>
>> Apache's "sites-enabled/mysite":
>>
>> ...
>> 
>>  ServerName "mysite"
>>  
>>    ProxyRequests Off
>>    
>>      Order deny,allow
>>      Deny from all
>>      Allow from localhost
>>    
>>
>>    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 /
>>  
>> 
>> ...
>>
>> 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-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
sp

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



Re: Wicket behind proxy (AJP)

2009-07-02 Thread James Carman
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  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":
>
> ...
>  enableLookups="false" />
> ...
>
> Apache's "sites-enabled/mysite":
>
> ...
> 
>  ServerName "mysite"
>  
>ProxyRequests Off
>
>  Order deny,allow
>  Deny from all
>  Allow from localhost
>
>
>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 /
>  
> 
> ...
>
> 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-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>