有的时候一些网站只想自己看见懂我意思吧
黑白名单
方式一:直接基于访问ip地址设置白名单
allow deny
##白名单设置,只允许下面三个来源ip的客户端以及本地能访问该站。
allow 222.65.126.38;
allow 100.110.15.17;
allow 100.110.15.18;
allow 127.0.0.1;
deny all;
root@iZuf63uqehzec73094965jZ:/etc/nginx/conf.d# cat ssl.stock.conf
server {
listen 80;
listen 443;
server_name stock.jinguanjia.me;
ssl on;
##白名单设置,只允许下面三个来源ip的客户端以及本地能访问该站。
allow 222.65.126.38;
allow 100.110.15.17;
allow 100.110.15.18;
allow 127.0.0.1;
deny all;
location / {
limit_conn limit 4;
limit_rate 200k;
proxy_pass http://127.0.0.1:5050;
}
location /favicon.ico {
root /etc/nginx/logo;
}
ssl_certificate /etc/nginx/cert/214065040190722.pem;
ssl_certificate_key /etc/nginx/cert/214065040190722.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
}
Comments | NOTHING