2017-11-23 4 views
0

プロダクションモードでは、サーバは起動に失敗し、次のログを出力し続けます。私はウェブページにアクセスできません。しかし、コードは開発モードで正常に動作します。どのように問題を解決する?要求が見つかりませんScalaでの `Host`ヘッダエラー2.6.7 Akka

2017-11-23T10:04:07+08 [INFO] from play.core.server.AkkaHttpServer [main] 
     Listening for HTTP on /0:0:0:0:0:0:0:0:9000 
2017-11-23T10:04:08+08 [WARN] from akka.actor.ActorSystemImpl [application-akka.actor.default-dispatcher-4] 
     Illegal request, responding with status '400 Bad Request': Request is 
     missing required `Host` header: Cannot establish effective URI of request 
     to `/`, request has a relative URI and is missing a `Host` header; 
     consider setting `akka.http.server.default-host-header` 

2017-11-23T10:04:08+08 [WARN] from akka.actor.ActorSystemImpl [application-akka.actor.default-dispatcher-3] 
     Illegal request, responding with status '400 Bad Request': Request is 
     missing required `Host` header: Cannot establish effective URI of request 
     to `/`, request has a relative URI and is missing a `Host` header; 
     consider setting `akka.http.server.default-host-header` 

答えて

1

haproxyサーバのヘルスチェックは、サーバー

haproxy httpchkこのように変更する必要があります

option httpchk GET/HTTP/1.1\r\nHost:localhost 
にホストヘッダーを送信しませんでした。
関連する問題