# NGinx as a reverse proxy and http\_sub\_folder module (and httpsubs)

**URL:** <https://www.ruby-forum.com/t/nginx-as-a-reverse-proxy-and-http-sub-folder-module-and-httpsubs/242948>\
**Category:** NGINX\
**Created:** [August 9, 2015, 10:31pm UTC](https://www.ruby-forum.com/t/nginx-as-a-reverse-proxy-and-http-sub-folder-module-and-httpsubs/242948 "2015-08-09T22:31:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 9, 2015, 10:31pm UTC](https://www.ruby-forum.com/t/nginx-as-a-reverse-proxy-and-http-sub-folder-module-and-httpsubs/242948/1 "2015-08-09T22:31:04Z")

</div>

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.([Module ngx\_http\_sub\_module](http://wiki.nginx.org/HttpSubsModule))

Here is my configuration:  
server {  
listen 8080;  
server\_name [www.xxx.com](http://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,

Posted at Nginx Forum:

> **[NGinx as a reverse proxy and http\_sub\_folder module (and httpsubs)](https://forum.nginx.org/read.php?2,260892,260892#msg-260892)**
>
> 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...
