-
Notifications
You must be signed in to change notification settings - Fork 0
2.3 vhost_esch.conf
couplewith edited this page Mar 7, 2018
·
2 revisions
server {
listen 9290;
server_name 22.21.5.205 22.21.5.206 22.21.5.68 22.21.5.69 22.21.5.70 e.ink.cn;
#charset koi8-r;
access_log logs/access-essch.log;
error_log logs/error-essch.log;
client_max_body_size 200M;
# add_header 'Access-Control-Allow-Origin' '*';
# add_header 'Access-Control-Allow-Credentials' 'true';
# add_header 'Access-Control-Allow-Methods' 'GET,POST,HEAD,DELETE,PUT,OPTIONS';
#
# # For CORS Ajax
# proxy_pass_header Access-Control-Allow-Origin;
# proxy_pass_header Access-Control-Allow-Methods;
# proxy_hide_header Access-Control-Allow-Headers;
# add_header Access-Control-Allow-Headers 'X-Requested-With, Content-Type';
# add_header Access-Control-Allow-Credentials true;
location ~ ^/.*action.* {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
}
location ~ ^/.*event.* {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
}
location ~ ^/.*app.* {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
}
location ~ ^/_plugin* {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
}
location ~ ^/_* {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
}
location ~ ^/_aliases$ {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/.*/_aliases$ {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/_nodes$ {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/.*/_search$ {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/.*/_mapping {
proxy_pass http://es_search_9200;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# location ~ ^/* {
# proxy_pass http://es_search_9200;
# proxy_read_timeout 90;
# }
# redirect server error pages to the static page /50x.html
# nginx html
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/nginx/html;
}
}