http_sub_module / sub_filter of nginx and reverse proxy not working

Check if the upstream source has gzip turned on, if so you need

proxy_set_header Accept-Encoding "";

so the whole thing would be something like

location / {
    proxy_set_header Accept-Encoding "";
    proxy_pass http://upstream.site/;
    sub_filter_types text/css;
    sub_filter_once off;
    sub_filter .upstream.site special.our.domain;
}

Check these links

  • https://www.ruby-forum.com/topic/178781
  • https://forum.nginx.org/read.php?2,226323,226323
  • http://www.serverphorums.com/read.php?5,542078

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)