admin.portal.yohobuy.com.conf 1.35 KB
 server {
    listen      80;
    server_name admin.portal.yohobuy.com;
    #charset koi8-r;
    access_log  /Data/logs/nginx/access_admin.portal.yohobuy.com.log  fenxi;

    location ^~ /pfcms/ {
	proxy_redirect off;
	proxy_pass  http://platform-cms/pfcms/;
	proxy_set_header   Host   "admin.portal.yohobuy.com";
	proxy_set_header   X-Real-IP  $remote_addr;
	proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header   Accept-Encoding "gzip";
    }

    location ^~ /platform/ {
        proxy_redirect off;
        proxy_pass  http://yohobuy-platform/platform/;
        #proxy_pass  http://yohobuy-platform-gray/platform/;
        proxy_set_header   Host   "admin.portal.yohobuy.com";
        proxy_set_header   X-Real-IP  $remote_addr;
        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_pass  http://yohobuy-portal;
        #proxy_pass  http://yohobuy-portal-gray;
        proxy_set_header   Host   "admin.portal.yohobuy.com";
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
}