1
私は本当に基本的な機能を持っています。私はcode/Page.php
で、非常にシンプル始まっ:このページを殺して、<% $createGreeting %>
SilverStripe - テンプレート変数の投げ込みエラー
しかし:
public function createGreeting() {
return 'hi';
}
私Page.ss
テンプレートでは、私は、変数を持っています。エラーログを確認したところ、表示されています:
PHP message: PHP Warning: Director::protocolAndHost() lacks sufficient information - HTTP_HOST not set. in /usr/share/nginx/html/lungmap/framework/control/Director.php on line 488" while reading upstream, client: 31.210.102.114, server: 52.90.93.59, request: "GET/HTTP/1.0", upstream: "fastcgi://unix:/var/run/php/php5.6-fpm.sock:" 2017/06/12 12:34:50 [error] 1730#0: *6682 FastCGI sent in stderr: "PHP message: PHP Warning: Director::protocolAndHost() lacks sufficient information - HTTP_HOST not set. in /usr/share/nginx/html/lungmap/framework/control/Director.php on line 488
何が原因なのでしょうか? Page.ss
からその行を削除すると、ページが完全に正常に読み込まれます。
nginxの設定を共有できますか? [docsの例](https://docs.silverstripe.org/ja/3/getting_started/installation/how_to/configure_nginx/)を使って始めましたか、独自のものを使いましたか?とにかく、nginxが['$ http_host'パラメータを設定していないようです(https://stackoverflow.com/questions/15414810/whats-the-difference-of-host-and-http-host-in-nginx )正しく。 –