gajuro
January 9, 2024, 6:02pm
1
Hello,
First thank you for the great service.
I am trying to proxy requests through an nginx app to a redbean web server app. After many hours of struggling and being very close, I think that I can’t bind my redbean process to listen to an IPv6 address.
I have also posted an issue in their github account to see if that would be actually possible (redbean listen ipv6 address · Issue #1077 · jart/cosmopolitan · GitHub ).
Is there anything else I can do to work around this issue?
Thank you very much in advance.
1 Like
billy
January 9, 2024, 6:42pm
2
Could running something like a socks5 proxy that sits in front of the web server work?
gajuro
January 10, 2024, 9:23am
3
Billy, thanks for answering.
I have never used socks5 proxy before and I was a bit intimidated by the docs. I set up the web machine to also run a nginx proxy through supervisord.
server {
listen 8080;
listen [::]:8080;
location / {
proxy_pass http://127.0.0.1:3000/;
}
}
If I send a request from the internet to the web server (app.fly.dev with ipv4) it does work correctly, but when I try to connect through the proxy app (app.flycast with ipv6) I get an Connection reset by peer error:
2024-01-10T09:16:04.832 app[91857e76f5e708] sea [info] 2024/01/10 09:16:04 [error] 311#311: *41 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.16.141.10, server: ~^(?<subdomain>.+)\.kabano\.com$, request: "GET / HTTP/1.1", upstream: "http://[fdaa:4:f834:0:1::6]:8080/", host: "app1-reddogroad.kabano.com"
gajuro
January 10, 2024, 12:54pm
4
I have figured it.
I had to also configure a service for tcp on the same port in the toml file:
[http_service]
internal_port = 8080
auto_start_machines = true
auto_stop_machines = true
min_machines_running = 0
processes = ["app"]
[[services]]
internal_port = 8080
protocol = "tcp"
[[services.ports]]
port = 8080
handlers = ["http"]
1 Like
system
Closed
January 17, 2024, 12:55pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.