Created
July 6, 2018 15:25
-
-
Save vkhazin/a6a5ee338a66ba3439307e4909e2cfc7 to your computer and use it in GitHub Desktop.
nginx kibana config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NginX reverse proxy for jenkins: https://gist.github.com/rdegges/913102 | |
FQDN="ec2-18-222-184-237.us-east-2.compute.amazonaws.com" | |
sudo apt install nginx -y | |
sudo rm /etc/nginx/sites-enabled/default | |
CONFIG="upstream kibana { | |
server $FQDN:5601 fail_timeout=0; | |
} | |
server { | |
listen 80 default; | |
server_name 127.0.0.1 $FQDN; | |
location / { | |
proxy_set_header Host \$http_host; | |
proxy_set_header X-Real-IP \$remote_addr; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; | |
add_header Pragma \"no-cache\"; | |
proxy_pass http://kibana; | |
} | |
} | |
" | |
echo "$CONFIG" | sudo tee /etc/nginx/sites-available/kibana | |
sudo ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/ | |
sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment