Open chen-chao opened 10 months ago
I guess nginx dispatches the subsequent request CONNECT app.example.com:443 HTTP/1.1 to server app.example.com, according to the Host field. The other server doesn't have the proxy_connect directive hence raise a 405 for the connection.
It seems as what you guessed here, but I'm not sure. I need some time to figure it out. Or you can enable and check the nginx debug log with your configuration.
Hi, I've been using the module for almost one week and it works quite well. Thanks for the good job!
But there's one use case that I'm concerned: the request to the other http servers that hosted by the same nginx cannot be proxied. So I'm here to seek help for any workaround.
Repro steps:
nginx.conf
that has multiple http servers (distinguished by the host field):http {
http directives are omitted...
server { listen 443 ssl; listen [::]:443 ssl; server_name proxy.example.com;
}
server { listen 443 ssl; listen [::]:443 ssl; server_name app.example.com;
} }
I guess nginx dispatches the subsequent request
CONNECT app.example.com:443 HTTP/1.1
to server app.example.com, according to theHost
field. The other server doesn't have theproxy_connect
directive hence raise a 405 for the connection.Is there any workaround to overcome this?