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;
}
}

posted @ 2017-12-27 16:45  一只宅男的自我修养  阅读(572)  评论(0编辑  收藏  举报