简体   繁体   English

跨服务器Apache SSI

[英]Crossserver Apache SSI

Ok so the question is, "Can I use in Apache SSI files located on another local server?" 好的,问题是,“我可以在另一台本地服务器上使用Apache SSI文件吗?”

The example is quite simple. 这个例子很简单。 Lets say I have an index.shtml on first server and inner.shtml on the second one. 可以说我在第一台服务器上有一个index.shtml,在第二台服务器上有inner.shtml。

Will this work? 这样行吗?

If not, what can work? 如果没有,那怎么办?

Ok, so the answere to this is NO I cannot do it, but there is a way to bypass it. 好的,对此的回答是“否”,我不能做,但是有一种绕过它的方法。

If I include the call to SSI and using Mod_Proxy I can channel it to a diferent Apache. 如果我包括对SSI的调用并使用Mod_Proxy,则可以将其引导到其他Apache。 Like this: 像这样:

<Location /external>
    RequestHeader unset Accept-Encoding
    ProxyPass http://SERVER2/api/search-software
</Location>

The apache will work on it, but remember that you have to unset the encoding in order for the GZIP not to work on it. apache可以使用它,但是请记住,您必须取消编码设置才能使GZIP不能使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM