crm.conf 2.61 KB
server{
        listen 80;
        server_name crmapi.yoho.cn;
        access_log /Data/logs/nginx/access_crmapi.log fenxi;


        location /crm/AiQiSMSReceiveController {
		deny all;
                proxy_redirect off;
                proxy_pass http://crm_pools/crm/AiQiSMSReceiveController;
                proxy_read_timeout 600s;
                proxy_send_timeout 600s;
                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";
        }


     location /crm/MWSMSReceiveController {
		allow 61.145.229.29;
		allow 112.91.147.37;
		allow 218.204.222.12;
		allow 211.100.48.90;
		allow 218.204.220.242;
		deny all;

		proxy_redirect off;
		proxy_pass http://crm_pools/crm/MWSMSReceiveController;
		proxy_read_timeout 600s;
		proxy_send_timeout 600s;
		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";
     }

        #location / {
        #        proxy_redirect off;
        #        proxy_read_timeout 600s;
        #        proxy_send_timeout 600s;
        #        proxy_pass http://crm_pools/crm;
        #        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";
        #}


}

server{ 
	listen 80; 

	server_name crm.yoho.cn crm2.yoho.cn; 
	access_log /Data/logs/nginx/access_crm.log fenxi; 


	location /crm/ {
	 
        {% for item in yoho_office_ips %}
        allow {{ item }};
        {%  endfor %}
        deny all;

        proxy_redirect off;
        proxy_pass http://crm_pools/crm/;
		proxy_read_timeout 600s;
		proxy_send_timeout 600s;
                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";
        }

	location / { 
 
        {% for item in yoho_office_ips %}
        allow {{ item }};
        {%  endfor %}
        deny all;

		proxy_redirect off; 
		proxy_read_timeout 600s;
		proxy_send_timeout 600s;
		proxy_pass http://crm_pools/crm; 
		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"; 
	} 


}