Created
March 21, 2019 10:15
-
-
Save cfitz/8617cc4a0943e00539972f117e56ca93 to your computer and use it in GitHub Desktop.
INCF ElasticSearch NGINX configuration
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
server { | |
listen 443; | |
server_name localhost; | |
ssl_certificate /etc/ssl/certs/STAR_incf_org-chained.crt; | |
ssl_certificate_key /etc/ssl/private/STAR_incf_org.key; | |
ssl on; | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; | |
ssl_prefer_server_ciphers on; | |
client_max_body_size 50m; | |
location ~ ^/elasticsearch/scigraph/entities/ { | |
rewrite ^/elasticsearch/(.*) /$1 break; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
limit_except GET POST OPTIONS HEAD { | |
deny all; | |
} | |
proxy_pass http://es; | |
} | |
location ~ /(_all|_search|_msearch)$ { | |
rewrite ^/elasticsearch/(.*) /$1 break; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
limit_except GET POST HEAD OPTIONS { | |
deny all; | |
} | |
proxy_pass http://es; | |
} | |
location /elasticsearch/ { | |
rewrite ^/elasticsearch/(.*) /$1 break; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
limit_except OPTIONS HEAD { | |
deny all; | |
} | |
proxy_pass http://es; | |
} | |
} | |
# Add these for each node so we round robin it. | |
upstream es { | |
server 192.168.222.1:9200; | |
# server 192.168.222.11:9200; | |
# server 192.168.222.12:9200; | |
# server 192.168.222.13:9200; | |
# server 192.168.222.14:9200; | |
# server 192.168.222.15:9200; | |
# server 192.168.222.16:9200; | |
# server 192.168.222.17:9200; | |
# server 192.168.222.18:9200; | |
keepalive 64; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment