Re: Different URL on backend

2011-01-24 Thread Holger Just
Sorry for the impersonation. My virtual identity setup got a bit overly
excited and made an aweful mess in the whole room. Guess I need some
napkins now...

--Holger



Re: Different URL on backend

2011-01-24 Thread haproxy
Hi Christian,

On 23.01.2011 23:00, Christian Jensen wrote:
> I need http://www.x.com/hudson/ to point to my internal server
> http://192.168.1.30:8080/
> 
> I have other urls too, such as http://www.x.com/svn/
> and http://www.x.com/trac/ that I would like to point to different
> servers and different ports with different URLs.

It is possible using regrep and friends. See the documentation [1] for
more info. Notice though, that you need to handle the different parts of
the URL individually, as the hostname is stored in the Host-Header, the
path and get parameters in the request string, and the port in the
actual TCP connection.

Also, Haproxy is not able to change content delivered by your
application servers (which only works sometimes on all those other
proxies who try to do this, btw.). Thus you need to configure your
backend servers to generate URLs exactly as the users are going to see them.

--Holger

[1] http://haproxy.1wt.eu/download/1.4/doc/configuration.txt




Re: Different URL on backend

2011-01-23 Thread Madhawa Jayanath
Hello Christian,
This is more likely "Revers Proxy" situation.
I'm sorry, I'm not sure Haproxy can do that. but I used Nginx on production.

You may try Nginx.
With following sample config.

nano /etc/nginx/proxy.conf
->8-
proxy_redirect  off;
proxy_set_headerHost$host;
proxy_set_headerX-Real-IP   $remote_addr;
proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size10m;
client_body_buffer_size 128k;
proxy_connect_timeout   90;
proxy_send_timeout  90;
proxy_read_timeout  90;
proxy_buffering off;

->8-

nano /etc/nginx/sites-available/www.x.com
->8-
server {
listen   :80;
server_name  _;
access_log /var/www/www.x.com/log/access.log;
error_log /var/www/www.x.com/log/error.log;

location / {
proxy_pass http://:80;
include /etc/nginx/proxy.conf;
   }

location /hudson {
proxy_pass http://192.168.1.30:8080;
include /etc/nginx/proxy.conf;
   }

   location /svn {
proxy_pass http://:8080;
include /etc/nginx/proxy.conf;
   }

   location /blah_blah {
proxy_pass http://:8080;
include /etc/nginx/proxy.conf;
   }
}
->8-

On Mon, Jan 24, 2011 at 5:00 AM, Christian Jensen  wrote:

> Hi guys,
>
> I have scoured the site and google and just cannot seem to find the answer
> I am looking for.
>
> I need http://www.x.com/hudson/ to point to my internal server
> http://192.168.1.30:8080/
>
> I have other urls too, such as http://www.x.com/svn/ and
> http://www.x.com/trac/ that I would like to point to different servers and
> different ports with different URLs.
>
> I don't need a complete configuration but more just what direction to head
> in. Can haproxy even do this?
>
> Thanks!
>
> --
> Christian Jensen
> Director of Technology
> Officepools.com Services Ltd.
> christ...@officepools.com
> http://www.officepools.com
> 1177 West Hastings, Suite 2088
> Vancouver, BC V6E 2K3
> +1 604 688-8999 x229 Office
> +1 778 996-4283 Mobile
>



-- 
Best regards,
Madhawa Jayanath

Senior Software Engineer
101 Global Co.,Ltd.
999/9 # 2409 Rama 1, Pathumwan
Bangkok, 10330. Thailand
INUM +883-510-07-403-6540
Tel. +66.840839412
FAX. +66.26480995


Sent from my NoteBook® by Hand


Different URL on backend

2011-01-23 Thread Christian Jensen
Hi guys,

I have scoured the site and google and just cannot seem to find the answer I
am looking for.

I need http://www.x.com/hudson/ to point to my internal server
http://192.168.1.30:8080/

I have other urls too, such as http://www.x.com/svn/ and
http://www.x.com/trac/ that I would like to point to different servers and
different ports with different URLs.

I don't need a complete configuration but more just what direction to head
in. Can haproxy even do this?

Thanks!

-- 
Christian Jensen
Director of Technology
Officepools.com Services Ltd.
christ...@officepools.com
http://www.officepools.com
1177 West Hastings, Suite 2088
Vancouver, BC V6E 2K3
+1 604 688-8999 x229 Office
+1 778 996-4283 Mobile