Welcome! Log In Create A New Profile

Advanced

Re: SSI and proxy_pass

Valentin V. Bartenev
July 10, 2014 02:36PM
On Thursday 10 July 2014 12:18:24 T.crowder wrote:
> Hi all,
>
> I'm trying out nginx. I would like to use it to perform the following:
>
> 1. Retrieve a page from a server1 which includes some SSI commands
> 2. Process the SSI commands, eventually including content from server2
> 3. Return the resultant page
>
> I've got SSI working when using a local file, but not when using the page
> from a server1 using proxy_pass.
>
> Here's my config I'm using to try to achieve the above.
>
> events {
> worker_connections 1024;
> }
> http {
> server {
> listen 80;
> server_name localhost;
>
> location /hello-world.html {
> ssi on;
> proxy_pass http://tom.office.bla.co.uk:8080/hello-world/;
> }
> }
> }
> For testing purposes, I'm using a simple SSI command, as shown in the output
> my browser actually ends up with, which is identical to the content on
> server1:
>
> <html>
>
> <!--# set var="test" value="Hello nginx!" -->
> <!--# echo var="test" -->
>
> </html>
>
> Do I need to use something other than proxy_pass, or is it just not
> possible? Thanks!
[..]

You need to look carefully what actually your "server1" returns to nginx.

It can be a response with an inappropriate content type (see the ssi_types
directive). Or, for example, it uses compression.

http://nginx.org/r/ssi_types

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

SSI and proxy_pass

T.crowder July 10, 2014 12:18PM

Re: SSI and proxy_pass

Valentin V. Bartenev July 10, 2014 02:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready