152 lines
3.6 KiB
Nginx Configuration File
152 lines
3.6 KiB
Nginx Configuration File
|
|
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 TLSv1.1 TLSv1.2;
|
|
#请按照这个套件配置,配置加密套件,写法遵循 openssl 标准。
|
|
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
|
ssl_prefer_server_ciphers on;
|
|
location / {
|
|
proxy_pass http://127.0.0.1:5000;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name yb.powerrain.cn;
|
|
|
|
location / {
|
|
root /data/yiban/yiban;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /data/wwwroot;
|
|
}
|
|
}
|
|
|
|
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 TLSv1.1 TLSv1.2;
|
|
|
|
location / {
|
|
root /data/yiban/yiban;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /data/wwwroot;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name m.yb.powerrain.cn;
|
|
|
|
location / {
|
|
root /data/yiban/yiban;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /data/wwwroot;
|
|
}
|
|
}
|
|
|
|
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 TLSv1.1 TLSv1.2;
|
|
|
|
location / {
|
|
root /data/yiban/yiban;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /data/wwwroot;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name powerrain.cn 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 {
|
|
#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 TLSv1.1 TLSv1.2;
|
|
|
|
location / {
|
|
root /data/wwwroot;
|
|
index index.html index.htm;
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /data/wwwroot;
|
|
}
|
|
}
|