You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "michael watson (IAH-C)" <mi...@bbsrc.ac.uk> on 2008/03/14 15:09:10 UTC

[users@httpd] Server side includes where the include is on another server...

Hello

I think I answered my own question, but lets try anyway.  I'm running
apache 2.2.4 on Red Hat and I want to user server-side includes.  I can
get them working if the include file is on the same server, but what I
really want is something like:

<!--#include
virtual="http://www.someotherserver.com/includes/leftcontent.html" -->

Where http://www.someotherserver.com is a server that is NOT the one the
shtml file is on, but a different server entirely (thogh still on our
intranet).

Is this possible?

Thanks
Mick

The information contained in this message may be confidential or legally
privileged and is intended solely for the addressee. If you have
received this message in error please delete it & notify the originator
immediately.
Unauthorised use, disclosure, copying or alteration of this message is
forbidden & may be unlawful. 
The contents of this e-mail are the views of the sender and do not
necessarily represent the views of the Institute. 
This email and associated attachments has been checked locally for
viruses but we can accept no responsibility once it has left our
systems.
Communications on Institute computers are monitored to secure the
effective operation of the systems and for other lawful purposes. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Server side includes where the include is on another server...

Posted by Nick Kew <ni...@webthing.com>.
On Fri, 14 Mar 2008 14:09:10 -0000
"michael watson \(IAH-C\)" <mi...@bbsrc.ac.uk> wrote:

> Hello
> 
> I think I answered my own question, but lets try anyway.  I'm running
> apache 2.2.4 on Red Hat and I want to user server-side includes.  I
> can get them working if the include file is on the same server, but
> what I really want is something like:
> 
> <!--#include
> virtual="http://www.someotherserver.com/includes/leftcontent.html" -->
> 
> Where http://www.someotherserver.com is a server that is NOT the one
> the shtml file is on, but a different server entirely (thogh still on
> our intranet).
> 
> Is this possible?

Not like that, though there's a patch that'll do it[1].

You can, however, reverse-proxy it:
<!--#include virtual="/backend/include/leftcontent.html"-->
and in httpd.conf:
ProxyPass /backend/ http://www.someotherserver.com/
etc.

[1] http://marc.info/?t=119353034300002&r=1&w=2

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org