1
自分のnginx設定がhttpsサーバと一致せず、代わりにサーバipにリダイレクトされます。Nginxがhttpsでserver_nameに一致しません
いくつかの回答は、default_serverがマッチングに必要であると示唆しているため、default_serverを追加しました。 HTTPは何とかうまくいくが、代わりにマシンのIPにリダイレクトされる。私は本当のIPアドレスの代わりに127.0.0.1を書きます
[email protected]:/etc/nginx# curl -I -L http://example.de
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.3
Date: Mon, 05 Jun 2017 08:30:09 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: https://www.example.de/
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.3
Date: Mon, 05 Jun 2017 08:30:10 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Pingback: https://127.0.0.1/xmlrpc.php
Location: https://127.0.0.1/
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
curl: (51) SSL: certificate subject name 'example.de' does not match target host name '127.0.0.1'
nginxのは1.10.3で、OSはDebianジェシー