忍者ブログ
  • 2024.04
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 2024.06
[PR]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

【2024/05/03 00:00 】 |
ngnix
起動コマンド

/etc/init.d/nginx start

/etc/nginx/sites-enable/以下

upstream appserver {
server localhost:3000;
}
geo $allowed {
default no;
202.32.47.0/24 yes;
219.163.197.64/27 yes;
221.186.216.16/29 yes;
202.143.92.128/26 yes;
61.197.167.128/28 yes;
122.208.122.144/29 yes;
10.0.0.0/8 yes;
122.132.171.175 yes;
219.109.218.130 yes;
210.122.209.56 yes;
210.122.209.124 yes;
210.122.209.230 yes;
}
server {
listen 80;
server_name otani1.bnr.bng.jp;

location / {
try_files $uri @proxy_to_appserver;
}
location @proxy_to_appserver {
if ($allowed = no) {
return 403;
}

access_log /var/log/nginx/otani1.bnr.bng.jp.access.log;
error_log /var/log/nginx/otani1.bnr.bng.jp.error.log;

proxy_pass http://appserver;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
PR
【2016/09/27 11:41 】 | サーバ | 有り難いご意見(0)
<<Unity描画負荷 | ホーム | redisコマンド>>
有り難いご意見
貴重なご意見の投稿














<<前ページ | ホーム | 次ページ>>