server {
    listen       80;
    server_name  localhost;

    location / {
        root   /data/wwwroot;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
}

server {
    listen       80;
    server_name  powerrain.cn;
    add_header Strict-Transport-Security "max-age=31536000";
    location / {
        root   /data/wwwroot;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/main.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name powerrain.cn;
    #证书文件名称
    ssl_certificate 1_powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/wwwroot;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/main443.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name qr.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_qr.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_qr.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location /data/ {
        alias /data/qrcode/data/;
    }
    location /qr {
        alias /data/qrcode/qr/;
        index qrcode.html;
    }
    location / {
      proxy_pass http://127.0.0.1:5000;
    }
    location /li {
      proxy_pass http://127.0.0.1:5001; 
    }
    access_log /data/nginx/logs/qr443.log;
}

server {
    listen       80;
    server_name  api.powerrain.cn;
    location / {
      proxy_pass http://127.0.0.1:5004;
    }
    location /excel/get/ {
      alias   /data/api/saveExcel/;
    }
    access_log /data/nginx/logs/api.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name api.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_api.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_api.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
      proxy_pass http://127.0.0.1:5004;
    }
    location /excel/get/ {
      alias   /data/api/saveExcel/;
    }
    access_log /data/nginx/logs/api443.log;
}

server {
    listen       80;
    server_name  blog.powerrain.cn;
    add_header Strict-Transport-Security "max-age=31536000";
    location / {
        root   /data/blog;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/blog.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name blog.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_blog.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_blog.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/blog;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/blog443.log;
}

server {
    listen       80;
    server_name  yb.powerrain.cn;
    add_header Strict-Transport-Security "max-age=31536000";
    location / {
        root   /data/yiban/yiban;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }

    location /api/photo/show/ {
      alias   /data/yiban/backend/upload/;
    }

    location /api {
      proxy_pass http://127.0.0.1:8000;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/yb.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name yb.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_yb.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_yb.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/yiban/yiban;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }

    location /api/photo/show/ {
      alias   /data/yiban/backend/upload/;
    }

    location /api {
      proxy_pass http://127.0.0.1:8000;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/yb443.log;
}

server {
    listen       80;
    server_name  m.yb.powerrain.cn;
    add_header Strict-Transport-Security "max-age=31536000";
    location / {
        root   /data/yiban/yiban;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }

    location /api/photo/show/ {
      alias   /data/yiban/backend/upload/;
    }

    location /api {
      proxy_pass http://127.0.0.1:8000;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/myb.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name m.yb.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_m.yb.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_m.yb.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/yiban/yiban;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
    
    location /api/photo/show/ {
      alias   /data/yiban/backend/upload/;
    }

    location /api {
      proxy_pass http://127.0.0.1:8000;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/myb443.log;
}

server {
    listen       80;
    server_name  coc.powerrain.cn;
    return 301 https://coc.powerrain.cn$request_uri;
    # return 301 https://cherry.lacus.site$request_uri;
    access_log /data/nginx/logs/coc.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name coc.powerrain.cn;

    #证书文件名称
    ssl_certificate 1_coc.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_coc.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/coc/coc;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
    location /api {
      proxy_pass http://127.0.0.1:5003;
    }
    location /api/photo/show/ {
      alias   /data/coc/backEnd/upload/;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/coc443.log;
}

server {
    listen       80;
    server_name  beta.powerrain.cn;
    return 301 https://beta.powerrain.cn$request_uri;
    access_log /data/nginx/logs/beta.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name beta.powerrain.cn;
    #证书文件名称
    ssl_certificate 1_beta.powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_beta.powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/beta/foreEnd;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
    location /api {
      proxy_pass http://127.0.0.1:5005;
    }
    location /api/photo/show/ {
      alias   /data/beta/backEnd/upload/;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/beta443.log;
}

server {
    listen       80;
    server_name  powerrain.cn;
    add_header Strict-Transport-Security "max-age=31536000";
    location / {
        root   /data/wwwroot;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/main.log;
}

server {
    #SSL 访问端口号为 443
    listen 443 ssl http2;    #填写绑定证书的域名
    server_name powerrain.cn;
    #证书文件名称
    ssl_certificate 1_powerrain.cn_bundle.crt;
    #私钥文件名称
    ssl_certificate_key 2_powerrain.cn.key;
    ssl_session_timeout 5m;
    #请按照这个协议配置
    ssl_protocols  TLSv1.1 TLSv1.2;
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
    ssl_prefer_server_ciphers on;
    location / {
        root   /data/wwwroot;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/wwwroot;
    }
    access_log /data/nginx/logs/main443.log;
}

# qr 5000 5001 
# coc 5003 
# api 5004
# beta 5005
# yb 8000