worker_processes 4;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#upstream http_backend {
#server g0tqs2dgkcs.globalsite.cc;
#}

server {
    listen       80;
    server_name  公司域名1;
server_tokens off;
    location / {
        add_header Access-Control-Allow-Origin * always;
        add_header Access-Control-Allow-Methods PUT,OPTIONS;
        add_header Access-Control-Allow-Headers Content-Type;
        proxy_set_header  X-Real-IP  $remote_addr;        

}
location /resource {
add_header Access-Control-Allow-Origin always;
add_header Access-Control-Allow-Methods PUT,OPTIONS;
add_header Access-Control-Allow-Headers Content-Type;
root /data/;
}
location /hotupdate {
add_header Access-Control-Allow-Origin
always;
add_header Access-Control-Allow-Methods PUT,OPTIONS;
add_header Access-Control-Allow-Headers Content-Type;
root /data/;
}
location /status {
stub_status on;
#allow 127.0.0.1;
#deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

server {
    listen 80;
    listen       443 ssl;
    server_name  公司域名1;
ssl on;
root html;
index index.html index.htm;

    ssl_certificate      /usr/local/nginx/cert/214871712560584.pem;
    ssl_certificate_key  /usr/local/nginx/cert/214871712560584.key;
    ssl_session_timeout  5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers  on;

}
#双域名配置
server {
    listen       80;
    server_name  公司域名2;
    location / {
        root   html2;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html2;
    }
}
#18088端口跳转配置
    server {
    listen       18088;
    ssl     on;
    ssl_certificate      /usr/local/nginx/ssl/legame_online.crt;
    ssl_certificate_key  /usr/local/nginx/ssl/legame_online.key;
    location / {
        proxy_set_header  X-Real-IP  $remote_addr;
        proxy_set_header  Upgrade   $http_upgrade;
        proxy_pass  https://172.27.7.12:18088;
    }
    }       

}