httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tiago Braga <tbragamach...@gmail.com>
Subject Re: [users@httpd] ProxyPass without slash not working
Date Thu, 10 Oct 2013 23:06:29 GMT
Sorry, I put the wrong example, below the correct:

ProxyPassMatch ^/(.*) http://static.host.com.br/html/directory
ProxyPassReverse / /html/directory/<http://static.host.com.br/html/directory/>

But,

When the url is /anythig
It's redirected to /anything/ with 302.

But I would like with 301.

How I do?



On Thu, Oct 10, 2013 at 7:24 PM, Tiago Braga <tbragamachado@gmail.com>wrote:

> I did the below rules:
>
> ProxyPassMatch ^/(.*)
> http://static.comprafacil.com.br/html/comprafacilempresas
> ProxyPassReverse / /html/comprafacilempresas/
>
> And it's working! Thanks!
>
>
>
> On Thu, Oct 10, 2013 at 5:13 PM, Tiago Braga <tbragamachado@gmail.com>wrote:
>
>> On Thu, Oct 10, 2013 at 4:13 PM, trifo <trifo75@gmail.com> wrote:
>>
>>> maybe a workaround to add the trailing slash automagically using reweite
>>> rule?
>>>
>>
>> I has tried and not works.
>>
>>
>>> --Trifo
>>>
>>> ≈( Telefonról küldve )≈
>>> On Oct 10, 2013 6:39 PM, "Tiago Braga" <tbragamachado@gmail.com> wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Thu, Oct 10, 2013 at 1:11 PM, Eric Covener <covener@gmail.com>wrote:
>>>>
>>>>> On Thu, Oct 10, 2013 at 12:03 PM, Tiago Braga <tbragamachado@gmail.com>
>>>>> wrote:
>>>>> > Looking the log and I see an thing:
>>>>> >
>>>>> > 127.0.0.1 - - [10/Oct/2013:13:00:46 -0300] "GET /teste HTTP/1.1"
302
>>>>> 301 "-"
>>>>> > "lwp-request/5.827 libwww-perl/5.833"
>>>>> > 127.0.0.1 - - [10/Oct/2013:13:00:46 -0300] "GET /html/directory/test/
>>>>> > HTTP/1.1" 404 594 "-" "lwp-request/5.827 libwww-perl/5.833"
>>>>>
>>>>> > Why do it occurs?
>>>>>
>>>>> The backend server redirected you to add a trailing slash. The proxy
>>>>> is supposed to strip off the /html/directory due to ProxypassReverse
>>>>> before the redirect goes out, but it doesn't happen.
>>>>>
>>>>
>>>> Look the directive "UseCanonicalName" in the doc of apache:
>>>>
>>>> "An example where this may be useful is on an intranet server where you
>>>> have users connecting to the machine using short names such as www. You'll
>>>> notice that if the users type a shortname, and a URL which is a directory,
>>>> such as http://www/splat, without the trailing slash then Apache will
>>>> redirect them tohttp://www.domain.com/splat/. .... But if
>>>> UseCanonicalName is set Off, then Apache will redirect to
>>>> http://www/splat/."
>>>>
>>>> So, when the url /test is called, it's redirected with trailing slash,
>>>> but not working with ProxyPass and ProxyPassReverse.
>>>>
>>>> How do I fix it?
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> Atenciosamente,
>>>> Tiago Braga Machado
>>>>
>>>
>>
>>
>> --
>> Atenciosamente,
>> Tiago Braga Machado
>>
>
>
>
> --
> Atenciosamente,
> Tiago Braga Machado
>



-- 
Atenciosamente,
Tiago Braga Machado

Mime
View raw message