Welcome! Log In Create A New Profile

Advanced

Re: SSI working on Apache backend, but not on gunicorn backend

Maxim Dounin
October 31, 2013 12:36PM
Hello!

On Thu, Oct 31, 2013 at 10:33:33AM -0400, j0nes2k wrote:

> Hello,
>
> I have nginx in front of an Apache server and a gunicorn server for
> different parts of my website. I am using the SSI module in nginx to display
> a snippet in every page. The websites include a snippet in this form:
> <!--# include virtual="/mysnippet.txt" -->
>
> For static pages served by nginx everything is working fine, the same goes
> for the Apache-generated pages - the SSI include is evaluated and the
> snippet is filled. However for requests to my gunicorn backend running a
> Python app in Django, the SSI include does not get evaluated.

[...]

> What is the cause for this behaviour? How can I get SSI includes working for
> my pages generated on gunicorn? How can I debug this further?

Possible reasons, in no particular order:

- Content-Type of responses returned by gunicorn isn't listed in
ssi_types in your nginx config.

- Responses returned by gunicorn are compressed (use
"Content-Encoding: gzip" or alike).

Further debugging can be done e.g. using a debug log, see
http://nginx.org/en/docs/debugging_log.html.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

SSI working on Apache backend, but not on gunicorn backend

j0nes2k October 31, 2013 10:33AM

Re: SSI working on Apache backend, but not on gunicorn backend

Maxim Dounin October 31, 2013 12:36PM

Re: SSI working on Apache backend, but not on gunicorn backend

j0nes2k November 01, 2013 03:45AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
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