Welcome! Log In Create A New Profile

Advanced

Re: Rewrite HTTP responses in "reverse proxy" mode

Antoine Nguyen
July 05, 2011 08:54AM
On 05/07/2011 14:19, Maxim Dounin wrote:
> Hello!
>
> On Tue, Jul 05, 2011 at 01:01:31PM +0200, Antoine Nguyen wrote:
>
>> Hi all,
>>
>> I'm trying to create a reverse proxy to serve a moodle site hosted
>> in the LAN of my company. The site is available from the Internet
>> but all links to static content in the HTTP responses are using the
>> internal address. This is an issue with moodle, not with nginx.
>>
>> Because I don't want to loose too much time on this, I'm trying to
>> play with both sub and subs modules to rewrite all occurences of
>> "internal address" to "external address" but without success.
>>
>> I'm wondering if HTTP substition is intented to work in a reverse
>> proxy context.
> Yes.
>
> Please note though that response must not be compressed by
> backend, i.e. you may want to add something like
>
> proxy_set_header Accept-Encoding "";
>
> to nginx config.
>
> You may also need to set sub_filter_types[1] as appropriate in your
> setup, by default it will only work on text/html.
>
> [1] http://sysoev.ru/nginx/docs/http/ngx_http_sub_module.html#sub_filter_types
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
I've just found what was the problem before reading your answer : the
backend had "mod_deflate" enabled by default. It works well now.

By the way, many thanks for your answer Maxim, it was exactly what I
needed :-)

--
Antoine Nguyen
Modoboa developer
http://modoboa.org


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

Rewrite HTTP responses in "reverse proxy" mode

Antoine Nguyen July 05, 2011 07:02AM

Re: Rewrite HTTP responses in "reverse proxy" mode

Maxim Dounin July 05, 2011 08:20AM

Re: Rewrite HTTP responses in "reverse proxy" mode

Antoine Nguyen July 05, 2011 08:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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