server {
    listen 80;
    listen 443 ssl http2;

    #ssl on;
    ssl_certificate ssl/xinyueyouxi.com.pem;
    ssl_certificate_key ssl/xinyueyouxi.com.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
    ssl_prefer_server_ciphers on;
    ssl_session_timeout 5m;

    
    charset utf-8;

    server_name club-adminapi.xinyueyouxi.com club-adminapi.xinyuesite.com;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Remote_addr $remote_addr;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header Host $host;
        proxy_connect_timeout 600s;
        proxy_send_timeout 600s;
        proxy_read_timeout 600s;
        
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_pass http://businessweb-svc:8007;
    }
    location /1 {
        root /usr/share/nginx/html/businessweb;
        try_files $uri $uri/ /index.html;
        #index index.html;
    }
    
    location /favicon.ico {
        log_not_found off;
        access_log off;
    }
}
server {
    listen 80;
	listen 443 ssl http2;
    #ssl on;
    ssl_certificate ssl/xinyueyouxi.com.pem;
    ssl_certificate_key ssl/xinyueyouxi.com.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
    ssl_prefer_server_ciphers on;
    ssl_session_timeout 5m;

    
    charset utf-8;

    server_name club-api.xinyuesite.com club-api1.xinyuesite.com club-api2.xinyuesite.com club-api3.xinyueyouxi.com club-api1.xinyueyouxi.com club-api2.xinyueyouxi.com club-api3.xinyueyouxi.com;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Remote_addr $remote_addr;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header Host $host;

        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_pass http://club-svc:18080;
    }
}
server {
    listen 80;
    listen 443 ssl http2;
    server_name club-admin.xinyueyouxi.com club-admin.xinyuesite.com;
    charset utf-8;
    
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Headers *;
    add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
    if ($request_method = 'OPTIONS') {
        return 204;
    }
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Remote_addr $remote_addr;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-CROS true;  # 自定义，有做跨域的时候需要加，后端会做判断
    proxy_redirect off;
    proxy_http_version 1.1;


    location / {
        root /usr/share/nginx/html/businessweb;
        try_files $uri $uri/ /index.html;
        index index.html;
    }
}

server {
    listen 80;
    listen 443 ssl http2;
    server_name mpa.xinyuepage.com;
    charset utf-8;

    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Headers *;
    add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
    if ($request_method = 'OPTIONS') {
        return 204;
    }



    location / {
        root /usr/share/nginx/html/businessweb-user;
        try_files $uri $uri/ /index.html;
        #index index.html;
    }
}