2016-12-01 82 views

回答

0

你應該有路由到您elasticsearch集羣這樣的配置中:

server { 
    listen 8080; 
    location/{ 
     proxy_pass http://localhost:9200; 
    } 
} 

也許你可能想看看這些:Deploying NGINX Plus with Elasticsearch & Setting up nginx for ES。希望它有助於開始。

+0

您還可以添加'proxy_set_header X-Real-IP $ remote_addr;'和'proxy_set_header Host $ http_host;'將遠程地址發送到您的主機。此外,您可以使用basit auth'auth_basic「Restricted Content」設置密碼; auth_basic_user_file /etc/nginx/.htpasswd;' – hkulekci