Published 22 days ago
Published 22 days ago
Kristian Tanuwijaya
Updated 22 days ago
0
version: 9.4.3
occurrence: random/intermittent
backend/upstream url: apache with https/ssl
error message: Hostname app1.my.domain.com provided via SNI and hostname app2.my.domain.com provided via HTTP are different
Carrie
Updated 22 days ago
0
Please separate the two domains into two independent applications, then see if the issue persists.
Kristian Tanuwijaya
Updated 21 days ago
0
so far (about half a day
Kristian Tanuwijaya
Updated 15 days ago
0
I have confirmed that this issue does not happen anymore, but does this bug supposed to be fixed? or is this workaround supposed to be permanent?
Carrie
Updated 15 days ago
0
Not a bug. It's how Nginx connection reuse works. When an established HTTPS connection is reused, a new TLS handshake is not performed, so the SNI does not change to match the Host header of the subsequent request.
Kristian Tanuwijaya
Updated 11 days ago
0
I managed to fix this by manually changing the nginx config in /etc/nginx inside safeline-tengine container by adding
proxy_http_version 1.0;
proxy_set_header Connection "close";
proxy_ssl_session_reuse off;
in ./sites-enabled/ files
Kristian Tanuwijaya
Updated 11 days ago
0
to reproduce the issue, assumming safeline is listening to port 3000, and is running in localhost, run this in terminal:
1curl -s -o /dev/null -w "Req A: %{http_code}\n" --resolve='my-app1.com:443:127.0.0.1' -k https://my-app1.com:3000 2curl -s -o /dev/null -w "Req B: %{http_code}\n" --resolve='my-app2.com:443:127.0.0.1' -k https://my-app2.com:3000 3done```
Kristian Tanuwijaya
Updated 11 days ago
0
is it possible to add those option to safeline per apps config?
Carrie
Updated 11 days ago
0
It is better to add these directives to the Custom Nginx Config in the advanced settings of the application. Configuration added at the underlying level will be lost once a full update is triggered.
Kristian Tanuwijaya
Updated 11 days ago
0
adding them via "custom nginx config" cannot comment out include proxy_params;, which may errors because there's already proxy_http_version directive in that file
Carrie
Updated 11 days ago
0
Add only the following directives to the custom NGINXconfiguration, then test it:
set $connection_upgrade close;
proxy_ssl_session_reuse off;