Created
February 13, 2015 16:44
-
-
Save feniix/851d51963111dc3013cb to your computer and use it in GitHub Desktop.
cors
This file contains hidden or 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
upstream elasticsearch { | |
server localhost:9200 fail_timeout=10s; | |
} |
This file contains hidden or 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 *:80; | |
server_name ~^.*$; | |
index index.html index.htm index.php; | |
access_log /var/log/nginx/frontend.access.log; | |
error_log /var/log/nginx/frontend.error.log; | |
location / { | |
proxy_pass http://jetty; | |
proxy_read_timeout 90; | |
proxy_connect_timeout 90; | |
proxy_redirect off; | |
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://elasticsearch; | |
proxy_read_timeout 90; | |
proxy_connect_timeout 90; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} |
This file contains hidden or 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
upstream jetty { | |
server localhost:8080 fail_timeout=10s; | |
} |
This file contains hidden or 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
1,1 All | |
user www-data; | |
worker_processes 1; | |
worker_rlimit_nofile 1024; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
access_log /var/log/nginx/access.log; | |
sendfile on; | |
server_tokens on; | |
types_hash_max_size 1024; | |
types_hash_bucket_size 512; | |
server_names_hash_bucket_size 64; | |
server_names_hash_max_size 512; | |
keepalive_timeout 65; | |
tcp_nodelay on; | |
add_header "Access-Control-Allow-Origin" "*"; | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
} |
This file contains hidden or 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_temp_path /var/nginx/proxy_temp; | |
client_body_temp_path /var/nginx/client_body_temp; | |
proxy_redirect off; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 90; | |
proxy_read_timeout 90; | |
proxy_buffers 32 4k; | |
proxy_buffer_size 8k; | |
proxy_http_version 1.0; | |
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_headers_hash_bucket_size 64; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment