Authored by chunhua.zhang

add local config

# only allow local ip
allow 10.66.0.0/16;
allow 10.67.0.0/16;
allow 192.168.0.0/16;
allow 172.31.0.0/16;
allow 127.0.0.1;
deny all;
\ No newline at end of file
... ...
## message controller
server {
# only allow local
include conf/local.access.conf
listen 80;
server_name message-controller.yohoops.org;
access_log /Data/logs/nginx/message_controller_access.log fenxi;
error_log /Data/logs/nginx/message_controller_error.log;
location / {
proxy_redirect off;
proxy_pass http://message;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
\ No newline at end of file
... ...
## review controller
server {
# only allow local
include conf/local.access.conf
listen 80;
server_name review.yoho.yohoops.org;
access_log /Data/logs/nginx/review_access.log fenxi;
error_log /Data/logs/nginx/review_error.log;
location / {
proxy_redirect off;
proxy_pass http://review;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
\ No newline at end of file
... ...
## review controller
server {
# only allow local
include conf/local.access.conf
listen 80;
server_name search.yohoops.org;
access_log /Data/logs/nginx/search_access.log fenxi;
error_log /Data/logs/nginx/search_error.log;
location / {
proxy_redirect off;
proxy_pass http://search;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
\ No newline at end of file
... ...
... ... @@ -34,6 +34,9 @@
- java-erpgateway
- java-union
- java-uic
- java-review
- java-message-controller
- search-service
- name: copy lualib files to openresty
copy:
... ...
... ... @@ -132,6 +132,30 @@ http
keepalive 100;
}
# review
upstream review {
{% for i in groups['java-review'] %}
server {{ i }}:8063;
{% endfor %}
keepalive 100;
}
# message controller
upstream message {
{% for i in groups['java-message-controller'] %}
server {{ i }}:8087;
{% endfor %}
keepalive 100;
}
# search
upstream search{
{% for i in groups['search-service'] %}
server {{ i }}:8080;
{% endfor %}
keepalive 100;
}
#apigatewaystart
... ... @@ -266,5 +290,7 @@ http
include vhosts/api.ufo.conf;
include vhosts/y-d.conf;
include vhosts/uic.conf;
include vhosts/review.conf;
include vhosts/message-controller.conf;
include vhosts/search.conf;
}
... ...
... ... @@ -57,7 +57,9 @@ host_group = {"yoho_gateway": "java-gateway",
"yohobuy_portal_gateway": "java-portal-gateway",
"yohobuy_extendstore": "java-extendstore",
"yoho_inbox": "java-inbox",
"yohobuy_crm": "java-crm"
"yohobuy_crm": "java-crm",
"yoho_reviewed": "java-review",
"yoho_message_controller": "java-message-controller"
}
# all available zone groups
all_groups = {}
... ...