Wt behind a proxy
Added by Gerald Brandt almost 3 years ago
Has anyone ran Wt behind a proxy? I have tinyproxy setup and all I get is a blank screen.
This is how I run my app:
./nexe-interface-x86_64.AppImage --http-address 127.0.0.1 --http-port 10000 --docroot ./docroot --approot ./approot
and this is the config for tinyproxy:
ReverseOnly yes
Port 9999
MaxClients 5
MinSpareServers 2
MaxSpareServers 5
StartServers 2
Logfile "/tmp/tinyproxy.log"
ReversePath "/" "http://localhost:10000"
The log file shows:
CONNECT Apr 28 09:54:37 [2353525]: Connect (file descriptor 10): 10.20.30.10 [10.20.30.10]
CONNECT Apr 28 09:54:37 [2353525]: Request (file descriptor 10): GET / HTTP/1.1
CONNECT Apr 28 09:54:37 [2353525]: Rewriting URL: / -> http://localhost:10000
INFO Apr 28 09:54:37 [2353525]: No upstream proxy for localhost
INFO Apr 28 09:54:37 [2353525]: opensock: opening connection to localhost:10000
INFO Apr 28 09:54:37 [2353525]: opensock: getaddrinfo returned for localhost:10000
CONNECT Apr 28 09:54:37 [2353525]: Established connection to host "localhost" using file descriptor 11.
INFO Apr 28 09:54:37 [2353525]: Closed connection between local client (fd:10) and remote client (fd:11)
CONNECT Apr 28 09:54:37 [2353525]: Connect (file descriptor 10): 10.20.30.10 [10.20.30.10]
CONNECT Apr 28 09:54:37 [2353526]: Connect (file descriptor 10): 10.20.30.10 [10.20.30.10]
CONNECT Apr 28 09:54:37 [2353525]: Request (file descriptor 10): GET /?wtd=pVHmyDrrO35na3BH&sid=1421859291&webGL=true&scrW=3072&scrH=1728&tz=-300&tzS=America%2FWinnipeg&htmlHistory=true&deployPath=%2F&request=script&rand=642395967 HTTP/1.1
CONNECT Apr 28 09:54:37 [2353526]: Request (file descriptor 10): GET /?wtd=pVHmyDrrO35na3BH&request=style&page=1 HTTP/1.1
CONNECT Apr 28 09:54:37 [2353525]: Rewriting URL: /?wtd=pVHmyDrrO35na3BH&sid=1421859291&webGL=true&scrW=3072&scrH=1728&tz=-300&tzS=America%2FWinnipeg&htmlHistory=true&deployPath=%2F&request=script&rand=642395967 -> http://localhost:10000?wtd=pVHmyDrrO35na3BH&sid=1421859291&webGL=true&scrW=3072&scrH=1728&tz=-300&tzS=America%2FWinnipeg&htmlHistory=true&deployPath=%2F&request=script&rand=642395967
CONNECT Apr 28 09:54:37 [2353526]: Rewriting URL: /?wtd=pVHmyDrrO35na3BH&request=style&page=1 -> http://localhost:10000?wtd=pVHmyDrrO35na3BH&request=style&page=1
Replies (2)
RE: Wt behind a proxy - Added by Roel Standaert almost 3 years ago
Yes, I've used various proxies with Wt, like HAProxy or Caddy.
I never tried tinyproxy, but I think you may just be missing a /
?
ReversePath "/" "http://localhost:10000/"
RE: Wt behind a proxy - Added by Gerald Brandt almost 3 years ago
That was the exact issue. Thank you!
Gerald