For people who might stumble on this thread I ended up using Nginx with
a configuration file which looks similar to this.

Predrag


# $OpenBSD: nginx.conf,v 1.16 2014/01/28 14:48:53 stephan Exp $

#user  www;
worker_processes  4;

#syslog     local5          nginx;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#error_log  syslog:notice|logs/error.log;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    index         index.html index.htm;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;
    #access_log  syslog:notice|logs/access.log main;

    #tcp_nopush     on;

    keepalive_timeout  65;

    server_tokens off;

    # Virtual hosts 
    server { 
        listen       myIP:80;
        server_name  www.test.org;
        location /www1 { 
            proxy_pass http://www1.int.test.org;
            proxy_next_upstream error timeout invalid_header http_500 http_502 
http_503 http_504;
            proxy_redirect off;
            proxy_buffering off;
            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            }
        location /www2 {
            proxy_pass http://www2.int.test.org;
            proxy_next_upstream error timeout invalid_header http_500 http_502 
http_503 http_504;
            proxy_redirect off;
            proxy_buffering off;
            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            }
    }

}

Reply via email to