それぞれ、nginx.confを編集します。
IP制限する場合
http {
deny xxx.xxx.xxx.xxx;
deny yyy.yyy.yyy.yyy;
allow all;
...
ベーシック認証する場合* 下記の.htpasswdファイルはApacheで使用しているいつものと同じ
server {
auth_basic "Authentication";
auth_basic_user_file "xxx/yyy/.htpasswd";
...
それぞれ、nginx.confを編集後にリロードします。$ sudo nginx -s reload
No comments:
Post a Comment