Authored by Your Name

修改java-nginx配置

... ... @@ -13,7 +13,9 @@
- shell: cat /proc/cpuinfo | grep processor | wc -l
register: cpu_count_ret
- set_fact:
processor_count: "{{ cpu_count_ret.stdout }}"
processor_count: "{{ cpu_count_ret.stdout }}"
vars_files:
- extra_vars/all.yml
vars_prompt:
- name: "confirmation"
prompt: "Sync and reload java nginx. Please Enter [YES] to continue"
... ...
... ... @@ -54,6 +54,12 @@
notify:
- reload nginx
- name: update nginx conf for file -union.yoho.cn.conf
template:
src: vhosts/union.yoho.cn.conf.j2
dest: "{{ path }}/nginx/conf/vhosts/union.yoho.cn.conf"
notify:
- reload nginx
- name: update nginx upstream for file -nginx.conf
template:
... ...
... ... @@ -5,10 +5,10 @@ server{
error_log /Data/logs/nginx/union_error.log;
location ^~ /admin {
if ( $proxy_add_x_forwarded_for !~* "(218.94.77.166|218.94.75.50|218.94.75.58|106.39.86.*|106.38.38.*)" ) {
return 401;
break;
}
{% for item in yoho_office_ips %}
allow {{ item }};
{% endfor %}
deny all;
proxy_redirect off;
proxy_pass http://union_pools/union/admin;
proxy_set_header Host $host;
... ... @@ -18,10 +18,10 @@ server{
}
location ^~ /union/admin {
if ( $proxy_add_x_forwarded_for !~* "(218.94.75.50|218.94.75.58|218.94.77.166|106.39.86.*|106.38.38.*)" ) {
return 401;
break;
}
{% for item in yoho_office_ips %}
allow {{ item }};
{% endfor %}
deny all;
proxy_redirect off;
proxy_pass http://union_pools/union/admin;
proxy_set_header Host $host;
... ...