proxy_pass and sub_filter?

Yuxing Huang lists at ruby-forum.com
Mon Feb 16 22:54:36 MSK 2009


Hi, I have a special use case to employ sub_filter to alter the content
from an upstream server by proxy_pass. Here is my minimal nginx.conf:

#############

user www-data www-data;

worker_processes 4;

events
{
        use epoll;
        worker_connections 2048;
}

http
{
        include "mime.types";
        server
        {
                server_name  external.upei.ca;

                listen 80;

                sub_filter internal.upei.ca external.upei.ca;
                sub_filter_types text/xml text/css text/javascript;

                location /
                {
                        proxy_pass http://internal.upei.ca;
                }
        }
}

#########

But the substitution filter does not work in this configuration. I tried
fastcgi_pass before and sub_filter works with fastcgi_pass. I also
googled around and found no answer to this question. Is this
configuration correct for sub_filter the content from a proxy upstream
server? Thank you!
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list