我有一個在Heroku上運行的網絡應用程序,並且由1und1(德國版本的域名註冊商1and1)管理域。要通過「example.com」使應用程序可用,我做了以下操作:1and1 HTTPS重定向不起作用,但HTTP確實
- 創建www.example.com subdomain in 1und1。
- 如Heroku的指南(CNAME www.example.com.herokudns.com)中所述,將其附加到www.example.com.herokudns.com。
- 訂購來自1und1的SSL證書,並用它們在Heroku端設置HTTPS。
- 設置HTTP重定向example.com - >
https://www.example.com
使頂層域指向Heroku。
這一切都工作得很好,直到我試圖通過https://example.com
得到應用 - Chrome會顯示我「這個網站無法提供安全連接」頁面ERR_SSL_PROTOCOL_ERROR。
捲曲輸出:
#1.
curl https://example.com
curl: (35) Server aborted the SSL handshake
#2.
curl -vs example.de
Rebuilt URL to: example.de/
Trying <example.de 1und1 IP address here>...
TCP_NODELAY set
Connected to example.de (<example.de 1und1 IP address here>) port 80 (#0)
GET/HTTP/1.1
Host: example.de
User-Agent: curl/7.51.0
Accept: */*
< HTTP/1.1 302 Found
< Content-Type: text/html; charset=iso-8859-1
< Content-Length: 203
< Connection: keep-alive
< Keep-Alive: timeout=15
< Date: Tue, 11 Jul 2017 14:19:30 GMT
< Server: Apache
< Location: http://www.example.de/
...
#3.
curl -vs https://example.de
Rebuilt URL to: https://example.de/
Trying <example.de 1und1 IP address here>...
TCP_NODELAY set
Connected to wavy.de (<example.de 1und1 IP address here>) port 443 (#0)
Unknown SSL protocol error in connection to example.de:-9838
Curl_http_done: called premature == 1
Closing connection 0
所以,問題是:我怎麼能建立HTTPS與1und1和Heroku的重定向?
根據我的經驗,通過1and1安裝ssl證書後可能需要幾個小時才能生效。 – user1628733
@ user1628733,謝謝你的回覆!也許我應該在帖子中提到它,但是我已經在2-3周前安裝了SSL證書並且HTTPS確實可行。 –