0

I need to proxying port 80 to localhost:81 and to virtualbox_guest:4567.

Normally on Linux I use NginX, with this configuration:

user nobody;
worker_processes  auto;
worker_rlimit_nofile 131072;
events {
    worker_connections 8192;
    use epoll;
    multi_accept on;
}
http {
    client_max_body_size 8M;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 90;
    keepalive_requests 16384;
    types_hash_max_size 8192;
    include       mime.types;
    default_type  application/octet-stream;
    gzip on;
    gzip_buffers      16 8k;
    gzip_comp_level   4;
    gzip_http_version 1.0;
    gzip_min_length   1280;
    gzip_types        text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp;
    gzip_vary         on;
    upstream aaa {
      server 127.0.0.1:81;
    }
    server {
        listen 80;
        server_name aaa.localhost;
        root /home/aaa/www;
        access_log /home/aaa/nginx.access.log;
        error_log /home/kyz/Dropbox/go/src/PUKIS/logs/nginx.error.log;
        location / {
            try_files $uri/index.html $uri @bbb;
        }
        location @pukis {
            proxy_read_timeout 300;
            proxy_connect_timeout 300;
            proxy_redirect     off;
            proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $scheme;
            proxy_set_header   Host              $http_host;
            proxy_set_header   X-Real-IP         $remote_addr;
            proxy_set_header   CLIENT_IP         $remote_addr;
            proxy_pass http://aaa;
        }
    }
    upstream bbb {
      server 127.0.0.1:4567;
    }
    server {
        listen 80;
        server_name bbb.localhost "" _;
        root /home/bbb/web;
        access_log /home/bbb/nginx.access.log;
        error_log /home/bbb/nginx.error.log;
        location / {
            try_files $uri/index.html $uri @bbb;
        }
        location @debug {
            proxy_read_timeout 300;
            proxy_connect_timeout 300;
            proxy_redirect     off;
            proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $scheme;
            proxy_set_header   Host              $http_host;
            proxy_set_header   X-Real-IP         $remote_addr;
            proxy_set_header   CLIENT_IP         $remote_addr;
            proxy_pass http://bbb;
        }
    }
}

What software should I use to do this on Windows?

Note: I know there is nginx for Windows, but there are some limitations.

  • So which limitations are relevant ? This will influence which solution we can offer. – Marged Jan 21 '16 at 13:31
1

WinGate will allow you to do this, in terms of the reverse proxying and header insertion.

there's a free license for 10 concurrent users, and we offer free support also.

Disclaimer: I work for Qbik, who are the authors of WinGate.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.