[crit] 358452#359832: *112 SSL_do_handshake() failed (SSL: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small)
下面是我的nginx配置
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
proxy_temp_path /setup/nginx-1.15.9/nginx-1.15.9/temp;
proxy_cache_path /setup/nginx-1.15.9/nginx-1.15.9/temp/proxy_temp2 keys_zone=proxyTemp:500m levels=1:2 inactive=6h
max_size=1g;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
gzip on;
#服务器的集群
upstream phonegame.top { #服务器集群名字
#server 127.0.0.1:28080 weight=2;#服务器配置 weight是权重的意思,权重越大,分配的概率越大。
server 127.0.0.1:18080 weight=1;
}
#服务器的集群
upstream 39.104.70.232 { #服务器集群名字
#server 127.0.0.1:28080 weight=2;#服务器配置 weight是权重的意思,权重越大,分配的概率越大。
server 127.0.0.1:18080 weight=1;
#server 127.0.0.1:8090 weight=1;
}
server {
listen 28080;
server_name 39.104.70.232;
location / {
root http://localhost:28080/;
index index.html index.htm;
}
}
#钉钉后台管理http://localhost:9520
server {
listen 9520;
server_name 39.104.70.232;
location / {
root http://localhost:9520/;
index index.html index.htm;
}
}
#钉钉后台
#server {
#listen 8090;
#server_name 39.104.70.232;
#location / {
#root http://localhost:8090/;
#index index.html index.htm;
#}
#}
#日报网站
#server {
#listen 8091;
#server_name 39.104.70.232;
#location / {
# root http://localhost:8092/;
# index index.html index.htm;
#}
#固定资产
server {
listen 8094;
server_name 39.104.70.232;
location / {
root E:\gdzc\dist;
index index.html index.htm;
}
location /hyapi {
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:18080/chainStore/; # 接口地址,如果在同一个服务器上,可以直接这样写
}
location /api {
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8090/; # 接口地址,如果在同一个服务器上,可以直接这样写
}
} # }
server {
listen 80;
server_name phonegame.top;
root html;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.jsp index.html index.htm;
proxy_pass http://$host;
proxy_redirect off;
}
location ~ \.(do|jsp){
proxy_pass http://$host;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
client_max_body_size 100m;
}
location ~ \.(html|js|png|gif|css){
proxy_cache proxyTemp;
proxy_cache_min_uses 1;
proxy_cache_valid 200 302 10h;
proxy_cache_valid 404 1m;
proxy_cache_valid any 1m;
proxy_cache_bypass $http_pragma $http_authorization;
proxy_pass http://$host;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
}
#将HTTP访问转为HTTPS
rewrite ^(.*)$https://$host$1 permanent;
#error_page 404 /404.html;
location = /404.html {
root html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
#CSMP平台运营网站(HTTPS server)
server {
listen 443 ssl;
server_name phonegame.top;
#listen 443 ssl
ssl_certificate cert/4001621_phonegame.top.pem;
ssl_certificate_key cert/4001621_phonegame.top.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://$host;
proxy_redirect off;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Forwarded-Proto https;
proxy_cookie_path
chunked_transfer_encoding off;
}
location ~ \.(do|jsp){
proxy_pass http://$host;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
}
location ~ \.(html|js|png|gif|css){
proxy_cache proxyTemp;
proxy_cache_min_uses 1;
proxy_cache_valid 200 302 10h;
proxy_cache_valid 404 1m;
proxy_cache_valid any 1m;
proxy_cache_bypass $http_pragma $http_authorization;
proxy_pass http://$host;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_connect_timeout 90;
proxy_send_timeout 90;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}