I have elasticsearch 1.4 and kibana4 running on an Amazo EC2 instance running RHEL7.
Kibana4 is running as a standalone process and is not deployed in a web container such as nginx.It is listening on Port 5601.(the default port). I would like to have kibana listen on port 80.
Can this be achieved without using nginx? If yes how?
Edit file {kibana-directory}/config/kibana.yml. Find this line:
port: 5601
and change it to:
port: 80
Full settings here: https://www.elastic.co/guide/en/kibana/current/settings.html
This should be added to config/kibana.yml server.port: 80
And run kibana server with sudo. Make sure no process is using port 80 at the same time.
Setting the port 80 in config file will trigger the following error
kibana[11777]: FATAL Error: listen EACCES: permission denied 0.0.0.0:80
due to the fact that kibana service by default executes under the user kibana
You can change the user to root, but this will trigger the following warning
kibana[11639]: Kibana should not be run as root. Use --allow-root to continue.
So running kibana service under root user is something not recommended. Better make a port forwarding rule, or a HTTP redirect if you have a web server.
来源:https://stackoverflow.com/questions/29615310/kibana4-to-listen-on-port-80-instead-of-port-5601