📜  nginx 只允许一个 ip - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:55.335000             🧑  作者: Mango

代码示例1
server {
    listen 80;
    server_name www.foo.bar;

    location / {
      root /path/to/rails/public/;
      passenger_enabled on;

      allow   my.public.ip.here;
      deny    all;
    }
  }