Welcome! Log In Create A New Profile

Advanced

Enabling SSI when using a proxy

François Battail
October 17, 2009 07:42AM
Dear list,

I've troubles for having SSI working with proxy_pass, when I use FastCGI
it works fine. I believe I've made a mistake but so far it's a mistery
for me!

The PHP code proxied looks like this:

<?php
echo '<!--# include virtual="/ssi/content.html" -->' ;
?>

and the site configuration like this:

# nginx 0.8.20
upstream apache
{
server 127.0.0.1:8080 ;
}

server
{
listen 80 ;
server_name localhost ;
ssi on ;

access_log /var/log/nginx/localhost.access.log ;

location /
{
ssi on ;
root /home/fb/www ;
location /ssi
{
internal ;
}
}

error_page 404 @php ;
error_page 403 @php ; # for the main page eg: "/"

# proxy the PHP scripts to Apache listening on :8080
location @php
{
rewrite ^(.*)$ /index.php?$1 break ;
proxy_set_header X-Real-IP $remote_addr ;
proxy_redirect off ;
ssi on ;
proxy_pass http://apache ;
}
}

The SSI directive is not processed by Nginx when the upstream reply (it
appears as an html comment).

Does anyone have a clue?

Best regards
Subject Author Posted

Enabling SSI when using a proxy

François Battail October 17, 2009 07:42AM

Re: Enabling SSI when using a proxy

François Battail October 17, 2009 11:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready