You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Jonathan Linczak <li...@hiram.edu> on 2004/06/28 18:43:22 UTC
Effects of Apache mod_proxy techniques
Hi all,
Been using the mod_proxy techniques to serve pages on our test site,
and ran into an interesting issue. Once everything is set up and I go
into the page2xhtml.xsl file to change the location of the css and
image directories (removing the {$root} entries), the images and CSS
show up great on the live site, but they now don't show up on the Lenya
management site (obviously). So, I've been trying to think of ways to
have it show up properly in both... Can this be done? If so, what do
you do?
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by Michael Wechner <mi...@wyona.com>.
Jonathan Linczak wrote:
> Hi all,
>
> Been using the mod_proxy techniques to serve pages on our test site,
> and ran into an interesting issue. Once everything is set up and I go
> into the page2xhtml.xsl file to change the location of the css and
> image directories (removing the {$root} entries), the images and CSS
> show up great on the live site, but they now don't show up on the
> Lenya management site (obviously). So, I've been trying to think of
> ways to have it show up properly in both... Can this be done? If so,
> what do you do?
the easiest way is to setup two servers (e.g. two Tomcats in different
ports)
Also goog for maintenance ;-)
HTH
Michi
>
> Jon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://cocoon.apache.org/lenya/
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by Jonathan Linczak <li...@hiram.edu>.
On Jun 28, 2004, at 5:34 PM, Gregor J. Rothfuss wrote:
> <!-- Resources -->
> <map:pipeline>
> <map:match pattern="**css/*.css">
> <map:act type="resource-exists"
> src="resources/shared/css/{2}.xml">
> <map:generate src="resources/shared/css/{../2}.xml"/>
> <map:transform src="../../resources/css/css.xsl">
> <map:parameter name="contextprefix"
> value="{request:contextPath}"/>
> </map:transform>
> <map:serialize type="text" mime-type="text/css"/>
> </map:act>
> <map:read src="resources/shared/css/{2}.css" mime-type="text/css"
> />
> </map:match>
>
> <map:match pattern="**images/**.*">
> <map:read src="resources/shared/images/{2}.{3}"
> mime-type="image/{3}" />
> </map:match>
>
> </map:pipeline>
I finally got around to checking this, and it didn't work for me. I am
still not bringing in images and CSS files on the proxied site. Here
is a sample of my httpd.conf file. Am I doing some wrong here that
could be causing the problems?
ServerName server.hiram.edu
DocumentRoot "/usr/local/jakarta-tomcat-5.0.25/webapps/lenya"
RewriteEngine On
RewriteRule "^/static/?(.*)" "$0" [L]
RewriteRule "^/lenya/default/live/(.*)" "/$1" [L]
RewriteRule "^/(.*)\.gif$" "$0" [L]
RewriteRule "^/(.*)\.(jpg|jpeg)$" "$0" [L]
RewriteRule "^/(.*)\.png$" "$0" [L]
RewriteRule "^/(.*)" "http://wwwn.hiram.edu:8080/lenya/default/live/$1"
[P]
ProxyPassReverse / http://wwwn.hiram.edu:8080/lenya/default/live/
Any help would be greatly appreciated!
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Jonathan Linczak wrote:
> Actually, I managed to write a Rewrite rule in Apache that accomplishes
> this, but seems too hackish... Gregor, do you have what the full
> pipeline with matcher would look like? Would you recommend the matching
> over the Rewrite rule?
<!-- Resources -->
<map:pipeline>
<map:match pattern="**css/*.css">
<map:act type="resource-exists" src="resources/shared/css/{2}.xml">
<map:generate src="resources/shared/css/{../2}.xml"/>
<map:transform src="../../resources/css/css.xsl">
<map:parameter name="contextprefix" value="{request:contextPath}"/>
</map:transform>
<map:serialize type="text" mime-type="text/css"/>
</map:act>
<map:read src="resources/shared/css/{2}.css" mime-type="text/css" />
</map:match>
<map:match pattern="**images/**.*">
<map:read src="resources/shared/images/{2}.{3}"
mime-type="image/{3}" />
</map:match>
</map:pipeline>
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by Jonathan Linczak <li...@hiram.edu>.
On Jun 28, 2004, at 3:38 PM, Jonathan Linczak wrote:
>> consider having a relative matcher in your sitemap:
>>
>> <map:match pattern="**css/default.css">
>> ...
>>
>> to make sure it always matches
Actually, I managed to write a Rewrite rule in Apache that accomplishes
this, but seems too hackish... Gregor, do you have what the full
pipeline with matcher would look like? Would you recommend the
matching over the Rewrite rule?
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by Jonathan Linczak <li...@hiram.edu>.
On Jun 28, 2004, at 2:12 PM, Gregor J. Rothfuss wrote:
>> Hi all,
>> Been using the mod_proxy techniques to serve pages on our test site,
>> and ran into an interesting issue. Once everything is set up and I
>> go into the page2xhtml.xsl file to change the location of the css and
>> image directories (removing the {$root} entries), the images and CSS
>> show up great on the live site, but they now don't show up on the
>> Lenya management site (obviously). So, I've been trying to think of
>> ways to have it show up properly in both... Can this be done? If
>> so, what do you do?
>
> consider having a relative matcher in your sitemap:
>
> <map:match pattern="**css/default.css">
> ...
>
> to make sure it always matches
Not to ignore Michael's response, because it is indeed a valid one, but
while I understand where you are going with this one, after I match it,
wouldn't I redirect to the right path? But the right path is different
for both the website and the authoring and live sections of Lenya, no?
Wouldn't I have to know where the request is coming from and redirect
appropriately? Sorry, I'm reading through my Cocoon Developer's
Handbook, but I'm still so new at this.
Jon
>
> --
> Gregor J. Rothfuss
> Wyona Inc. - Open Source Content Management - Apache Lenya
> http://wyona.com http://cocoon.apache.org/lenya
> gregor.rothfuss@wyona.com gregor@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Effects of Apache mod_proxy techniques
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Jonathan Linczak wrote:
> Hi all,
>
> Been using the mod_proxy techniques to serve pages on our test site, and
> ran into an interesting issue. Once everything is set up and I go into
> the page2xhtml.xsl file to change the location of the css and image
> directories (removing the {$root} entries), the images and CSS show up
> great on the live site, but they now don't show up on the Lenya
> management site (obviously). So, I've been trying to think of ways to
> have it show up properly in both... Can this be done? If so, what do
> you do?
consider having a relative matcher in your sitemap:
<map:match pattern="**css/default.css">
...
to make sure it always matches
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org