-
-
Save ibrahimozgon/dcf8c53885d6f7ae9e304951e2e008e0 to your computer and use it in GitHub Desktop.
Nginx Elasticsearch Configuration Files
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
proxy_cache_path /var/cache/nginx/cache keys_zone=elasticsearch:10m inactive=60m; | |
upstream elasticsearch_servers { | |
least_conn; | |
server 47.4.119.33 weight=1; | |
server 159.173.202.86 weight=1; | |
server 121.161.211.146 weight=1; | |
server 119.112.63.63 weight=1; | |
server 249.165.150.187 weight=1; | |
} | |
server { | |
listen 80; | |
gzip on; | |
location / { | |
proxy_pass http://elasticsearch_servers; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_cache elasticsearch; | |
proxy_cache_valid 200 302 10m; | |
proxy_cache_valid 404 1m; | |
proxy_connect_timeout 5s; | |
proxy_read_timeout 10s; | |
} | |
access_log /etc/nginx/es_access.log combined; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment