Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

2

I ended up using nginx with the stream SSL preread module. The configuration is dead simple: stream { server { resolver 127.0.0.1; listen 443; ssl_preread on; proxy_pass $ssl_preread_server_name:443; } } No http { } block would even be needed, but nginx segfaulted for me if I omitted it, so I have an empty http { } ...


2

RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} =old.com RewriteRule ^(.*)$ https://new.com$1 [R=permanent,L] It's not clear why these directives would not redirect https://old.com. However, it's not strictly correct and can be immediately simplified. For instance, it certainly won't redirect www.old.com as you are explicitly checking for old.com (an ...


1

Yes, using the instance's Elastic IP as a DNS A record is exactly the cause of the problem. The DNS record needs to point directly to the load balancer.


1

Thanks all for the help. The problem was that section below was duplicated in another files. <VirtualHost *:443> </VirtualHost> However I accepted @MrWhite solution because he suggested two improvement in configuration: splitting each domain in a separate vHost and to remove HTTPS server variable. Thanks


1

You can set variables in HAProxy with http-request set-var to the SNI value and reference it with var. https://www.haproxy.com/documentation/hapee/1-9r1/onepage/#7.3.2-var


Only top voted, non community-wiki answers of a minimum length are eligible