absolute url for PDF link does not work behind reverse proxy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

absolute url for PDF link does not work behind reverse proxy

Benoit Maison
Hello,
I am running xwiki 0.9.840 in tomcat, with apache accepting outside
connections and using mod_proxy to forward them to tomcat.
I have seen the question in the FAQ about reverse proxies and absolute URLs.
However I find that the 'PDF' link is absolute, and shows as
'localhost:8080'  in the xwiki pages.
How can I tell xwiki to use the correct (external) base url ?
Thanks a lot,
-Benoit



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: absolute url for PDF link does not work behind reverse proxy

Frank Haefemeier
Am Mo, den 13.02.2006 schrieb Benoit Maison um 17:26:
> I am running xwiki 0.9.840 in tomcat, with apache accepting outside
> connections and using mod_proxy to forward them to tomcat.
> I have seen the question in the FAQ about reverse proxies and absolute URLs.
> However I find that the 'PDF' link is absolute, and shows as
> 'localhost:8080'  in the xwiki pages.
> How can I tell xwiki to use the correct (external) base url ?

Take a look in the file <xwiki>/templates/viewheader.vm
<xwiki> is the path to your XWiki installation.
You have access to this directory directly from your xwiki,
if you have administration rights. Go to admin page XWiki.WebHome
and go the Skin page. There is a link to the directory.

You have to change the entry

<a href="$doc.getExternalURL("pdf", "$!{revparams}")" class="img">

into

<a href="$doc.getURL("pdf", "$!{revparams}")" class="img">

And for the case you are editing this file, you can change each
$doc.getExternalURL entry into $doc.getURL entry.

You have two choices to do this. First you can edit directly
this file or you define a new skin, copy the whole file
into the field 'View Header' and make the changes. After that
you activate the skin over the XWiki Preferences Menu.

Bye
        Frank
--
Dipl. Inform. Frank Häfemeier <[hidden email]>
----------------------------------------------------




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws