
upstream api.etongai.com{
        server 175.27.243.90;
}
upstream store.etongai.com{
        server 175.27.243.90;
}
server {
    listen 80;
    server_name store.etongai.com;
    add_header Access-Control-Allow-Origin *;
    autoindex on;
    autoindex_exact_size on;
    autoindex_localtime on;
    root /home/httpstore;
    access_log /home/httpstore/acc_log;
    location / {
    }
}

server {
    listen 80;
    server_name www.etongai.com;
    index index.html;
    root /home/zhxyclient/3_8_5/dist;
    access_log /home/zhxyclient/3_8_5/acc_log;
    add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
    add_header Access-Control-Allow-Headers *;
    if ($request_method = 'OPTIONS') {
        return 204;
    }
    location / {
        try_files $uri $uri/ /index.html;
    }
    location /dalgw/{
        proxy_set_header Host $proxy_host;
        proxy_pass http://api.etongai.com/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Authorization $http_authorization;
        proxy_pass_header Authorization;
        client_max_body_size 0;
    }
    location /httpstore/{
        root /home;
    }
}

server {
    listen 80;
    server_name expert.etongai.com;
    index index.html;
    root /home/zhxyexpert/3_8_5/dist;
    access_log /home/zhxyexpert/3_8_5/acc_log;
    add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
    add_header Access-Control-Allow-Headers *;
    if ($request_method = 'OPTIONS') {
        return 204;
    }
    location / {
        try_files $uri $uri/ /index.html;
    }
    location /dalgw/{
        proxy_set_header Host $proxy_host;
        proxy_pass http://api.etongai.com/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Authorization $http_authorization;
        proxy_pass_header Authorization;
        client_max_body_size 0;
    }
    location /httpstore/{
        root /home;
    }
}

server {
    listen 80;
    server_name printer.etongai.com;
    index index.html;
    root /home/printer/0_0_1/dist;
    access_log /home/printer/0_0_1/acc_log;
    add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
    add_header Access-Control-Allow-Headers *;
    if ($request_method = 'OPTIONS') {
        return 204;
    }
    location / {
        try_files $uri $uri/ /index.html;
    }
    location /dalgw/{
        proxy_set_header Host $proxy_host;
        proxy_pass http://api.etongai.com/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Authorization $http_authorization;
        proxy_pass_header Authorization;
        client_max_body_size 0;
    }
    location /httpstore/{
        root /home;
    }
}
