0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nginx.conf【自分用】proxy_set_header:proxy_pass

Last updated at Posted at 2017-02-21

【結論】
proxy_set_header : proxy_pass => currentレベル合わせる
=> 別に合わせなくても良かったという・・・なんでだ?

【結果】

nginx.conf

          proxy_set_header X-Real-IP              $remote_addr;

          location / {
              proxy_set_header Host                   $host;
              proxy_set_header X-Forwarded-Host       $host;
              proxy_set_header X-Forwarded-Server     $host;
              proxy_set_header X-Forwarded-For        $proxy_add_x_forwarded_for;
 
              proxy_pass http://localhost:8181;
          }

["HTTP_HOST"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_HOST"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_SERVER"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_FOR"]=>
string(9) "127.0.0.1"
=> X-Real-IP無し

【参考】
<>

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?