I have Two Servers ..One Installed with Elastic Search on Ubuntu(ip address 192.168.0.2) and Other Working as a Webserver IIS having .NET Application ...
I am Able to Access the Elastic Search on Ubuntu using the Web Browser using the Below Method :-
!
my nginx file Contains
server {
listen 80 default_server;
server_name _;
return 301 http://$server_name$request_uri;
}
server {
listen 443 default_server ssl http2;
server_name _;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
ssl_session_cache shared:SSL:10m;
location / {
proxy_pass http://localhost:9200;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
When Trying to Access the same URL Using .Net using the below code:-
using Nest;
using System;
namespace IDGElasticSearch
{
class Program
{
static void Main(string[] args)
{
var node = new Uri(“https://192.168.0.2”);
var settings = new ConnectionSettings(node);
var client = new ElasticClient(settings);
var response = client.ClusterHealth();
Console.WriteLine(response.Status);
Console.Read();
}
}
}
I get No Output.... Pls Guide me a way forward...