[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haproxy
Subject:    Re: no trailing slash results in 301
From:       Rapsey <rapsey () gmail ! com>
Date:       2009-07-23 16:51:56
Message-ID: 97619b170907230951j5adab9b0g8136d9a99bfc0674 () mail ! gmail ! com
[Download RAW message or body]

Oh it's not a haproxy issue but a webserver one. Because it detects a
directory at that location, it will redirect back to itself, with the same
URL and add a trailing slash. Unfortunately the server is at 8080 and it
will add that port also.


Sergej

On Thu, Jul 23, 2009 at 4:39 PM, Rapsey <rapsey@gmail.com> wrote:

> http://somewebaddress/test  will result in a 301 to the server for which
> haproxy should be proxying requests. So the user is redirected to
> http://localhost:8080/test.
> http://somewebaddress/test/ works fine.
> I tried backend nginx and apache and it is the same.
>
> Anyone have an idea whats going on? My haproxy config:
>
> global
>         maxconn 10000
>         pidfile /tmp/haproxy.pid
>
> defaults
>         contimeout      5000
>         clitimeout      50000
>         srvtimeout      50000
>
> frontend httpfront *:80
>         mode http
>         option forwardfor
>         acl acl_str path_end .str
>         use_backend someservice if acl_str
>         default_backend nginx
>
> backend someservice
>         mode http
>         option httpclose
>         server strserver 127.0.0.1:6002
>
> backend nginx
>         mode http
>         option httpclose
>         server nginxsrv 127.0.0.1:8080
>
>
> thank you
> Sergej
>

[Attachment #3 (text/html)]

Oh it&#39;s not a haproxy issue but a webserver one. Because it detects a directory \
at that location, it will redirect back to itself, with the same URL and add a \
trailing slash. Unfortunately the server is at 8080 and it will add that port \
also.<br> <br><br>Sergej<br><br><div class="gmail_quote">On Thu, Jul 23, 2009 at 4:39 \
PM, Rapsey <span dir="ltr">&lt;<a \
href="mailto:rapsey@gmail.com">rapsey@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <a href="http://somewebaddress/test" \
target="_blank">http://somewebaddress/test</a>  will result in a 301 to the server \
for which haproxy should be proxying requests. So the user is redirected to <a \
href="http://localhost:8080/test" target="_blank">http://localhost:8080/test</a>.<br>

<a href="http://somewebaddress/test/" target="_blank">http://somewebaddress/test/</a> \
works fine.<br>I tried backend nginx and apache and it is the same. <br><br>Anyone \
have an idea whats going on? My haproxy config:<br> <br>global<br>        maxconn \
10000<br>  pidfile /tmp/haproxy.pid<br><br>defaults<br>        contimeout      \
5000<br>        clitimeout      50000<br>        srvtimeout      \
50000<br><br>frontend httpfront *:80<br>        mode http<br>        option \
forwardfor<br>

        acl acl_str path_end .str<br>        use_backend someservice if acl_str<br>   \
default_backend nginx<br><br>backend someservice<br>        mode http<br>        \
option httpclose<br>        server strserver <a href="http://127.0.0.1:6002" \
target="_blank">127.0.0.1:6002</a><br>

<br>backend nginx<br>        mode http<br>        option httpclose<br>        server \
nginxsrv <a href="http://127.0.0.1:8080" \
target="_blank">127.0.0.1:8080</a><br><br><br>thank you<br>Sergej<br> \
</blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic