rpm -ivf nginx-1.10.3-1.el6.ngx.x86_64.rpm
rpm -qa httpd-
.conf
server {
listen 80;
server_name example.com;
location / {
proxy_passhttp://localhost: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;
}
}
vi /etc/sysconfig/iptabless
-A INPUT -m state --state NEW -m tcp -p tcp --dport 81 -j ACCEPT
service iptables restart
service nginx restart
checking if nginx is installed well
cd /usr
echo "test">./share/nginx/html/index.html
and then goto
localhost:81 or ip:81
you will see "test"