nginx 限制solr
server {
listen 80;
server_name bai.com www.bai.com;
location /solr/ {
allow 192.168.0.0/24;
allow *****;
allow ***;
deny all;
proxy_set_header Host $host;
proxy_set_header X-Real-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8082/solr/;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8082;
}
}