設定の要件は、 super.example.com/login.aspxにはSSL通信となり haproxy経由で443ポート接続で受けた、super.example.com/login.aspxの証明書を紐解いて、 80ポートでバックエンド側に通信を行いたい事が要件です
・haproxyにはexample.comのワイルドカード証明書が入っています
・haproxyには、既にtest-example.comのドメインでのバックエンド側通信設定が入っています
・80での非SSLで受けたものは redirect scheme https if !{ ssl_fc } のhaproxyでhttpからhttpsへリダイレクトする設定を入れています
・haproxyバージョンは1.5.18 です
・OSはCentOS7.6です
[root@haproxy01 ~]# curl -vv -I https://test-example.com/login.aspx * About to connect() to test-example.com port 443 (#0) * Trying **.**.**.**... * Connected to test-example.com(**.**.**.**) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using SHA****** * Server certificate: * subject: CN=example.com,OU=Div.,O=*** Corporation,L=***,ST=***,C=JP * start date: ************* * expire date: ************* * common name: *.example.com * issuer: ******************************* > HEAD /login.aspx HTTP/1.1 > User-Agent: curl/7.29.0 > Host: super.example.com > Accept: */* > * Empty reply from server * Connection #0 to host super.example.com left intact curl: (52) Empty reply from server [root@haproxy01 ~]#
●test-example.comドメインの入ったhaproxy.cfgにsuper.example.comの通信設定を下記のように入れ、httpでcurlで実行した結果は下記になります
[root@haproxy01 haproxy]# curl -vvv -I http://super.example.com * About to connect() to super.example.com port 80 (#0) * Trying **.**.**.**... * Connected to super.example.com (**.**.**.**) port 80 (#0) > HEAD / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: super.example.com > Accept: */* > < HTTP/1.1 302 Found HTTP/1.1 302 Found < Cache-Control: no-cache Cache-Control: no-cache < Content-length: 0 Content-length: 0 < Location: https://super.example.com/login.aspx Location: https://super.example.com/login.aspx < Connection: close Connection: close < * Closing connection 0
httpでのcurl実行時は302で https://super.example.com/login.aspxにリダイレクトはしているのですが
実行結果にページ情報が入ってきませんし、
httpsでのcurl実行時は、curl: (52) Empty reply from server となります
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。