Apache / 2.2.22 (Ubuntu) mod_proxy, mod_filter e mod_substitute

2

Ao tentar substituir o conteúdo dos tipos de conteúdo de texto usando mod_substitute e mod_filter, ele não funciona com a configuração do proxy reverso.

<virtualhost *:80>
    ServerName rp
    ProxyRequests Off
    ProxyPreserveHost Off
    <Location />
        ProxyPass http://site/
        ProxyPassReverse http://site/
        FilterDeclare replace
        FilterProvider replace SUBSTITUTE resp=Content-Type $text/
        FilterProtocol replace "change=yes proxy=transform cache=no"
        FilterChain +replace
        FilterTrace replace 1
        Substitute "s/foo/bar/in"
    </Location>
</virtualhost>

O cabeçalho da solicitação parece

Host: site
Cache-Control: max-age=0
Accept: image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36
Referer: http://rp/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
X-Forwarded-For: 10.1.1.107
X-Forwarded-Host: rp
X-Forwarded-Server: rp
Connection: Keep-Alive

Qual poderia ser a causa disso?

    
por Ablue 04.02.2014 / 05:19

1 resposta

1

Isso funcionou ...

<VirtualHost *:80>
        ProxyRequests Off
        ProxyPreserveHost Off
        ServerName rp
        ProxyPass       / http://site/
        ProxyPassReverse / http://site/
        RewriteEngine On
        SetOutputFilter INFLATE;proxy-html;DEFLATE
        ProxyHTMLURLMap http://site http://rp
</VirtualHost>
    
por 11.02.2014 / 02:07