16
9

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.

AWS で Nginx でリバースプロキシするときの resolver の DNS サーバ

Posted at

状況

AWS で、 nginx をフロントに立てて、後ろのサーバへリバースプロキシをしていた。
このとき、 nginx の config ファイルに、 resolver を設定しないといけなくなった。

問題

よく検索したときのサンプルにある 127.0.0.1 は当然ダメ。
/etc/resolv.conf を見ると、 ネットワークアドレス + 2 の値が書いているが、
毎回これを書くのもなあ。
っていうかこれ何?

解決

  1. VPC ごとに DNS サーバの IP アドレスは決まっていて、ネットワークアドレス + 2
    10.0.0.0/24 なら 10.0.0.2 がアドレス

  2. 共通で使えるにも DNS サーバもある。 169.254.169.253

参考文献

ここに全部かいている。
http://docs.aws.amazon.com/ja_jp/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html#AmazonDNS

16
9
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
16
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?