-1

I have nginx installed on my Centos 7 box and would like to forward calls to my kibana installation on port 5601. Kibana is up and running and am able to browse to it by by appending the port to the url in the browser.

My nginx.conf file is as follows

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;
}

in the conf.d directory I have placed a file called default.conf that looks like:

server {
listen 80;
server_name 192.168.33.36;
#auth_basic "Restricted Access";
#auth_basic_user_file /etc/nginx/htpasswd.users;
location / {
    proxy_pass http://192.168.33.36:5601;
    #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;
}
}

I new to nginx so im sure im doing something stupid but I have spent hours trying to figure it out. Anyone know whats wrong?

Nginix is running becuase when i browse to port 80 i get the default nginx web page displayed but it doesn forward to port 5601

John
  • 99
  • 2
  • Have you done basic problem solving? 1) Making sure your request gets to the server. 2) Curling the port 5601 server from the box. 3) Returning a simple HTML page in the location before you set up a proxy pass. Once you've done all that more precisely tell us what you've done, exact requests made, log files (nginx access, nginx error, kibaba) to show what happens. – Tim Apr 11 '16 at 09:32
  • Has i previously said 5601 is up and running and can get to it through a browser and the kibana page is displayed. nginx is up and running becuase i get the default page it serves only thing i want is instead of the default page that it forwards to kibana. – John Apr 11 '16 at 09:41
  • Have you got any other files in `conf.d`? Are you using `http://192.168.33.36` as the url or something else – Drifter104 Apr 11 '16 at 09:44
  • Show the relevant log lines of a request.. – gxx Apr 11 '16 at 09:45
  • no the only file in conf.d is the one i mentioned. and i am using http://192.168.33.36 – John Apr 11 '16 at 09:52

1 Answers1

0

It appears i must not have been restarting the service correctly between edits becuase I rebooted the box and it started working. Not sure why stopping the service was not working though

John
  • 99
  • 2