Traffic Limit and HTTP Header rewrite

Anto aryanto at
Sun Dec 27 21:35:07 MSK 2009

Thanks for your reply.

I do need conditional logic, especially to re-write the "Content-Type" 
header. So I can set it depending on whether the original file is  *.js, 
*.css or *.html when serving their gzip format. As I said before, I can 
easily do that using Lighttpd via mod_magnet LUA script. So I am 
wondering if I could do that in Nginx when I finally use it to replace 
my Lighttpd (if it really could replace it).

杨镭 wrote:
> As for the http header rewrite, it depends on your needs. In simple 
> cases, you can use  "proxy_hide_header" and "add_header" directive to 
> hide some headers from upstream response and add them back using 
> variables supported by Nginx. This is more or less the same as "http 
> header rewrite".
> However, if your "rewrite" needs include conditional logic, I just 
> don't know how to do that.
> On Sun, Dec 27, 2009 at 8:25 PM, Anto <aryanto at 
> <mailto:aryanto at>> wrote:
>     Hello Everybody,
>     Some time ago, it was mentioned that we can not limit the traffic
>     per server on Nginx. We have to use traffic shaper at the OS level
>     to do that. Is it still the case now?
>     And I want to try Nginx, but I can not find any where in the
>     documentations about how to do the HTTP header re-write. What I
>     would like to do is to be able to re-write the HTTP header set by
>     Drupal, especially the "Expires", "Cache-Control",
>     "Last-Modified", "Content-Encoding" and "Content-Type" headers. I
>     am using Lighttpd and I can do the removal and re-write of those
>     HTTP headers via mod_magnet LUA script. Is there similar function
>     like that in Nginx, which allow me to do that without changing
>     anything in Drupal?
>     Kind regards,
>     Anto
>     _______________________________________________
>     nginx mailing list
>     nginx at <mailto:nginx at>
> ------------------------------------------------------------------------
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list