Re: rewrite and proxy question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi,
I realized I forgot to mention we are running apache 2.0.
On Tue, June 30, 2009 8:52 pm, Igor Cicimov wrote:
> What about this:
>
> DirectoryIndex index.cfm
this was already set in our server config.
>
> Or maybe changing the redirect to
>
> RewriteRule ^/(.*)$ http://192.168.0.100/$1 [P]
>
this doesn't help. this is (part of) the log line for the initial request:
[rid#ccdee58/initial] (4) RewriteCond: input='/'
pattern='.*\.cfm|cfc|cfml|jsp|jws$' => not
-matched
it isn't until after it processes the .htaccess file in the domain's
docroot that i see this in the rewrite log:
rid#ccef280/subreq] (2) init rewrite engine with requested uri /index.cfm
i need to use the proxy rewrite at this point, but it seems like by this
point i lose the ability to preserve the requested hostname for the proxy
server (for which i can use ProxyPreserveHost On in the server config or
vhost block).
>
> On Tue, Jun 30, 2009 at 11:41 PM, K. Clair wrote:
>
>> Hi All,
>>
>> I'm trying to figure out if the following is possible. Let me know if
>> anyone has any ideas!
>>
>> I have a webserver that takes all incoming requests, and I am trying
>> to proxy all coldfusion requests to another server.
>>
>> So I have set up a rewrite to catch the requests based on filenames
>> and proxy them, like so:
>> RewriteCond %{REQUEST_FILENAME} .*\.cfm|cfc|cfml|jsp|jws$ [NC]
>> RewriteRule ^(.*)$ http://192.168.0.100/$1 [P]
>>
>> This is configured to apply across many virtual hosts, so the proxy
>> server needs to know the requested hostname. Therefor, I'm also using
>> ProxyPreserveHost On in the server config.
>>
>> This is all working splendidly except for directory requests which
>> come in as /, and where the index file is index.cfm. To catch these
>> requests, it seems I need to put the rewrite in a .htaccess file.
>> However, ProxyPreserveHost cannot go in the .htaccess file, and it
>> being set to On in the main server config is not carrying over to the
>> .htaccess file. So when the rewrite goes in the .htaccess file,
>> requests to / get properly proxied, but the proxy server cannot answer
>> correctly because the requested hostname is lost.
>>
>> Thoughts?? and Thanks!
>> -K
>>
[]
[Index of Archives]
[Open SSH Users]
[Linux ACPI]
[Linux Kernel]
[Linux Laptop]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Squid]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]