You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Gary <gz...@gmail.com> on 2005/11/18 00:07:24 UTC
proxying questions....
Hi,
I am trying to follow this howto on proxying:
http://lenya.apache.org/1_2_x/components/deployment/proxying.html
My publication is called template, it's a copy of the default publication.
I uncommented and modified the publication.xconf to this:
<proxy area="live" ssl="true" url="https://test.z.net"/>
<proxy area="live" ssl="false" url="http://test.z.net"/>
<proxy area="authoring" ssl="true"
url="https://cms.z.net/template/authoring"/>
<proxy area="authoring" ssl="false"
url="http://cms.z.net/template/authoring"/>
My httpd.conf looks like this:
<VirtualHost *:80>
ServerName cms
ServerAlias cms.z.net
ProxyRequests Off
RewriteEngine On
RewriteRule ^/([^/\.]+)$ $1/ [R]
RewriteRule ^/([^/\.]+)/$ http://cms.z.net/$1/authoring/index.html [R,L]
RewriteRule ^/(.*) http://cms.z.net:8080/$1 [P,L]
ProxyPassReverse / http://cms.z.net:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName test
ServerAlias test.z.net
ProxyRequests Off
RewriteEngine On
RewriteRule ^/$ $1/index.html [R]
RewriteRule ^/template/live/(.*)$ /$1 [R,L]
RewriteRule ^/(.*) http://test.z.net:8080/template/live/$1 [P,L]
ProxyPassReverse / http://test.z.net:8080/
</VirtualHost>
The apache proxy is working as expected... but I don't understand what's
suppose to happen on the lenya side, since I didn't see what I was
expecting to see (maybe my expectations are incorrect).
1. all the links to internal documentations in the navigation area are
relative, just like before I changed publication.xconf. I was expecting
all absolute links using the prefix defined in publication.xconf.
2. when I clicked on the "live" tab, the pop-up of the live page still
uses the authoring hostname.
http://cms.z.net/template/live/index.html, I was hoping it would be
http://test.z.net/index.html
3. I was hoping http://localhost:8080/template/live/index.html would
have links in the navigation that starts with http://test.z.net. but no
they are all relative. As I navigate through the site, it stays in
localhost:8080.
Just seems like the LinkRewritingTransformer mentioned in the howto is
not working.
I am running lenya 1.2.4 , cocoon 2.1.7, apache 2.0.48, tomcat 5.5.9 on
windows-xp.
I installed lenya in ROOT of tomcat webapps, as described in the howto,
because I wanted a cleaner live site URL..
I added cms.z.net, and test.z.net to my etc/hosts file, they all resolve
to 127.0.0.1.
Can anyone tell me the correct behavior with the changes I made to
publication.xconf.
thanks,
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: proxying questions....
Posted by Josias Thoeny <jo...@wyona.com>.
On Fri, 2005-11-18 at 10:36 -0600, Gary wrote:
> Josias Thoeny wrote:
>
> >On Thu, 2005-11-17 at 17:07 -0600, Gary wrote:
> >
> >
> >>Hi,
> >>
> >>I am trying to follow this howto on proxying:
> >>http://lenya.apache.org/1_2_x/components/deployment/proxying.html
> >>
> >>My publication is called template, it's a copy of the default publication.
> >>I uncommented and modified the publication.xconf to this:
> >>
> >> <proxy area="live" ssl="true" url="https://test.z.net"/>
> >> <proxy area="live" ssl="false" url="http://test.z.net"/>
> >> <proxy area="authoring" ssl="true"
> >>url="https://cms.z.net/template/authoring"/>
> >> <proxy area="authoring" ssl="false"
> >>url="http://cms.z.net/template/authoring"/>
> >>
> >>My httpd.conf looks like this:
> >>
> >><VirtualHost *:80>
> >> ServerName cms
> >> ServerAlias cms.z.net
> >>
> >> ProxyRequests Off
> >> RewriteEngine On
> >>
> >> RewriteRule ^/([^/\.]+)$ $1/ [R]
> >> RewriteRule ^/([^/\.]+)/$ http://cms.z.net/$1/authoring/index.html [R,L]
> >>
> >> RewriteRule ^/(.*) http://cms.z.net:8080/$1 [P,L]
> >> ProxyPassReverse / http://cms.z.net:8080/
> >></VirtualHost>
> >>
> >><VirtualHost *:80>
> >> ServerName test
> >> ServerAlias test.z.net
> >>
> >> ProxyRequests Off
> >> RewriteEngine On
> >>
> >> RewriteRule ^/$ $1/index.html [R]
> >> RewriteRule ^/template/live/(.*)$ /$1 [R,L]
> >>
> >> RewriteRule ^/(.*) http://test.z.net:8080/template/live/$1 [P,L]
> >> ProxyPassReverse / http://test.z.net:8080/
> >></VirtualHost>
> >>
> >>
> >>The apache proxy is working as expected... but I don't understand what's
> >>suppose to happen on the lenya side, since I didn't see what I was
> >>expecting to see (maybe my expectations are incorrect).
> >>1. all the links to internal documentations in the navigation area are
> >>relative, just like before I changed publication.xconf. I was expecting
> >>all absolute links using the prefix defined in publication.xconf.
> >>2. when I clicked on the "live" tab, the pop-up of the live page still
> >>uses the authoring hostname.
> >>http://cms.z.net/template/live/index.html, I was hoping it would be
> >>http://test.z.net/index.html
> >>3. I was hoping http://localhost:8080/template/live/index.html would
> >>have links in the navigation that starts with http://test.z.net. but no
> >>they are all relative. As I navigate through the site, it stays in
> >>localhost:8080.
> >>
> >>
> >
> >What about the internal links that you create e.g. with BXE? Are they
> >being rewritten? I think that's what the LinkRewritingTransformer should
> >be doing.
> >If you start your browser at http://test.z.net, does the navigation
> >work? I mean are you staying on the correct host when you navigate
> >through the site?
> >
> >- Josias
> >
> >
> >
>
> I am using Kupu. If I go directly to http://test.z.net, the navigation
> works fine, because the links are all relative, so
> the user would stay in test.z.net as they surf the site. So, no sign of
> link rewriting.
> The proxy configurations in publication.xconf doesn't seem to have any
> effect (at least for me).
The proxy configuration is used to rewrite internal links in the content
of a page. E.g. in the "home" page of the default publication, there are
three such links ("Concepts section", "Features section", "tutorial").
These links are not relative and therefore have to be rewritten.
In the code I see that only links starting with $context/$pubid
(e.g. /lenya/default) are rewritten, so it doesn't catch the relative
links.
Does anyone have an explanation for this?
IMHO, either all links should be rewritten, or all should be relative.
Josias
> Apache rewrite rules are doing all the work.
> Another thing to illustrate my point is the images in the shared folder
> are still referenced with "/template/live" e.g.
> "/template/live/images/banner.gif"
> And there's a rewrite rules in httpd.conf to compensate for this, it
> strips out the '/template/live/' part.
>
> Appreciate some comments from those who have used the proxying howto,
> and had success with it.
> Thanks,
>
> Gary
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: proxying questions....
Posted by Gary <gz...@gmail.com>.
Josias Thoeny wrote:
>On Thu, 2005-11-17 at 17:07 -0600, Gary wrote:
>
>
>>Hi,
>>
>>I am trying to follow this howto on proxying:
>>http://lenya.apache.org/1_2_x/components/deployment/proxying.html
>>
>>My publication is called template, it's a copy of the default publication.
>>I uncommented and modified the publication.xconf to this:
>>
>> <proxy area="live" ssl="true" url="https://test.z.net"/>
>> <proxy area="live" ssl="false" url="http://test.z.net"/>
>> <proxy area="authoring" ssl="true"
>>url="https://cms.z.net/template/authoring"/>
>> <proxy area="authoring" ssl="false"
>>url="http://cms.z.net/template/authoring"/>
>>
>>My httpd.conf looks like this:
>>
>><VirtualHost *:80>
>> ServerName cms
>> ServerAlias cms.z.net
>>
>> ProxyRequests Off
>> RewriteEngine On
>>
>> RewriteRule ^/([^/\.]+)$ $1/ [R]
>> RewriteRule ^/([^/\.]+)/$ http://cms.z.net/$1/authoring/index.html [R,L]
>>
>> RewriteRule ^/(.*) http://cms.z.net:8080/$1 [P,L]
>> ProxyPassReverse / http://cms.z.net:8080/
>></VirtualHost>
>>
>><VirtualHost *:80>
>> ServerName test
>> ServerAlias test.z.net
>>
>> ProxyRequests Off
>> RewriteEngine On
>>
>> RewriteRule ^/$ $1/index.html [R]
>> RewriteRule ^/template/live/(.*)$ /$1 [R,L]
>>
>> RewriteRule ^/(.*) http://test.z.net:8080/template/live/$1 [P,L]
>> ProxyPassReverse / http://test.z.net:8080/
>></VirtualHost>
>>
>>
>>The apache proxy is working as expected... but I don't understand what's
>>suppose to happen on the lenya side, since I didn't see what I was
>>expecting to see (maybe my expectations are incorrect).
>>1. all the links to internal documentations in the navigation area are
>>relative, just like before I changed publication.xconf. I was expecting
>>all absolute links using the prefix defined in publication.xconf.
>>2. when I clicked on the "live" tab, the pop-up of the live page still
>>uses the authoring hostname.
>>http://cms.z.net/template/live/index.html, I was hoping it would be
>>http://test.z.net/index.html
>>3. I was hoping http://localhost:8080/template/live/index.html would
>>have links in the navigation that starts with http://test.z.net. but no
>>they are all relative. As I navigate through the site, it stays in
>>localhost:8080.
>>
>>
>
>What about the internal links that you create e.g. with BXE? Are they
>being rewritten? I think that's what the LinkRewritingTransformer should
>be doing.
>If you start your browser at http://test.z.net, does the navigation
>work? I mean are you staying on the correct host when you navigate
>through the site?
>
>- Josias
>
>
>
I am using Kupu. If I go directly to http://test.z.net, the navigation
works fine, because the links are all relative, so
the user would stay in test.z.net as they surf the site. So, no sign of
link rewriting.
The proxy configurations in publication.xconf doesn't seem to have any
effect (at least for me).
Apache rewrite rules are doing all the work.
Another thing to illustrate my point is the images in the shared folder
are still referenced with "/template/live" e.g.
"/template/live/images/banner.gif"
And there's a rewrite rules in httpd.conf to compensate for this, it
strips out the '/template/live/' part.
Appreciate some comments from those who have used the proxying howto,
and had success with it.
Thanks,
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: proxying questions....
Posted by Josias Thoeny <jo...@wyona.com>.
On Thu, 2005-11-17 at 17:07 -0600, Gary wrote:
> Hi,
>
> I am trying to follow this howto on proxying:
> http://lenya.apache.org/1_2_x/components/deployment/proxying.html
>
> My publication is called template, it's a copy of the default publication.
> I uncommented and modified the publication.xconf to this:
>
> <proxy area="live" ssl="true" url="https://test.z.net"/>
> <proxy area="live" ssl="false" url="http://test.z.net"/>
> <proxy area="authoring" ssl="true"
> url="https://cms.z.net/template/authoring"/>
> <proxy area="authoring" ssl="false"
> url="http://cms.z.net/template/authoring"/>
>
> My httpd.conf looks like this:
>
> <VirtualHost *:80>
> ServerName cms
> ServerAlias cms.z.net
>
> ProxyRequests Off
> RewriteEngine On
>
> RewriteRule ^/([^/\.]+)$ $1/ [R]
> RewriteRule ^/([^/\.]+)/$ http://cms.z.net/$1/authoring/index.html [R,L]
>
> RewriteRule ^/(.*) http://cms.z.net:8080/$1 [P,L]
> ProxyPassReverse / http://cms.z.net:8080/
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName test
> ServerAlias test.z.net
>
> ProxyRequests Off
> RewriteEngine On
>
> RewriteRule ^/$ $1/index.html [R]
> RewriteRule ^/template/live/(.*)$ /$1 [R,L]
>
> RewriteRule ^/(.*) http://test.z.net:8080/template/live/$1 [P,L]
> ProxyPassReverse / http://test.z.net:8080/
> </VirtualHost>
>
>
> The apache proxy is working as expected... but I don't understand what's
> suppose to happen on the lenya side, since I didn't see what I was
> expecting to see (maybe my expectations are incorrect).
> 1. all the links to internal documentations in the navigation area are
> relative, just like before I changed publication.xconf. I was expecting
> all absolute links using the prefix defined in publication.xconf.
> 2. when I clicked on the "live" tab, the pop-up of the live page still
> uses the authoring hostname.
> http://cms.z.net/template/live/index.html, I was hoping it would be
> http://test.z.net/index.html
> 3. I was hoping http://localhost:8080/template/live/index.html would
> have links in the navigation that starts with http://test.z.net. but no
> they are all relative. As I navigate through the site, it stays in
> localhost:8080.
What about the internal links that you create e.g. with BXE? Are they
being rewritten? I think that's what the LinkRewritingTransformer should
be doing.
If you start your browser at http://test.z.net, does the navigation
work? I mean are you staying on the correct host when you navigate
through the site?
- Josias
>
> Just seems like the LinkRewritingTransformer mentioned in the howto is
> not working.
>
> I am running lenya 1.2.4 , cocoon 2.1.7, apache 2.0.48, tomcat 5.5.9 on
> windows-xp.
> I installed lenya in ROOT of tomcat webapps, as described in the howto,
> because I wanted a cleaner live site URL..
> I added cms.z.net, and test.z.net to my etc/hosts file, they all resolve
> to 127.0.0.1.
>
>
> Can anyone tell me the correct behavior with the changes I made to
> publication.xconf.
>
>
> thanks,
> Gary
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org