Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Created March 6, 2022 05:46
Show Gist options
  • Save stevehenderson/1b3bb6494a36158cd570afe1e1bd0ab0 to your computer and use it in GitHub Desktop.
Save stevehenderson/1b3bb6494a36158cd570afe1e1bd0ab0 to your computer and use it in GitHub Desktop.
Elastic Kibana XPACK Behind Reverse NGINX Proxy
server {
listen 443 ssl;
server_name ~^kibanasub\.;
root /www/cluster;
ssl_certificate /etc/nginx/certificates/cert1.pem;
ssl_certificate_key /etc/nginx/certificates/privkey1.pem;
ssl_protocols TLSv1.2 TLSv1.3;
error_log /var/log/nginx/error.log;
#Redirect to the Kibana pod
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_redirect off;
}
}
server {
listen 443 ssl;
server_name ~^elasticsub\.;
root /www/cluster;
ssl_certificate /etc/nginx/certificates/cert1.pem;
ssl_certificate_key /etc/nginx/certificates/privkey1.pem;
ssl_protocols TLSv1.2 TLSv1.3;
error_log /var/log/nginx/error.log;
#Redirect to the ES pod
location / {
proxy_pass http://localhost:9200;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment