Welcome! Log In Create A New Profile

Advanced

NGinx as a reverse proxy and http_sub_folder module (and httpsubs)

August 09, 2015 04:30PM
I am trying to reverse proxy my website and modify the content. To do so, I compiled nginx with sub_filter --with-http-sub_module as well as httpsubs . It now accepts the sub_filter directive, but it does not work somehow.(http://wiki.nginx.org/HttpSubsModule)

Here is my configuration:
server {
listen 8080;
server_name www.xxx.com;

access_log /var/log/nginx/www.xxx.access.log main;
error_log /var/log/nginx/www.xxx.error.log;
root /usr/share/nginx/html;
index index.html index.htm;

## send request back to apache1 ##
location / {
sub_filter <title> '<title>test</title>';
sub_filter_once on;


proxy_pass http://www.google.fr;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}
}

I also tried with the subs_filter directives, none of them work.

Can anyone help me ?

Regards,
Subject Author Posted

NGinx as a reverse proxy and http_sub_folder module (and httpsubs)

thms007 August 09, 2015 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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