nginx

nginxでIP制限

こんな感じ。 location / { allow 127.0.0.1; allow 192.168.1.0/24; deny all; root html; index index.html index.htm; }たぶん実際上はallow.confみたいなやつに切り出しておいて allow 127.0.0.1; allow 192.168.1.0/24; deny all; location / { include…

nginxでvirtual hostをきってプロキシ

server { listen 80; server_name dev.adorechic.ha-tena.com; location / { proxy_pass http://localhost:8080; } }ちなみにserver_nameで長めのドメインとか指定すると nginx: [emerg] could not build the server_names_hash, you should increase server…