每次一创建成功就直接退出容器了,
日志一直在报错:2021/12/14 13:23:30 [info] 24#24: *2573 recv() failed (104: Connection reset by peer) while waiting for request, client: 119.29.105.136, server: 0.0.0.0:80
配置是:nginx.conf
iworker_processes 1;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
pid /var/log/nginx/nginx.pid;
events {
multi_accept on; #设置一个进程是否同时接受多个网络连接,默认为off
worker_connections 1024; #最大链接数
}
http {
include mime.types; #文件扩展名与文件类型映射
default_type application/octet-stream; #默认文件类型,默认值为text/plain
access_log /var/log/nginx/access.log;
sendfile on;
server {
listen 443; #监听端口
server_name www.xnkj.ren; #站点名称
ssl_certificate 1_www.xnkj.ren_bundle.crt;
ssl_certificate_key 2_www.xnkj.ren.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;
location / {
root /usr/share/nginx/html; #首页所在的文件夹
index index.html index.htm; #首页位置
try_files $uri $uri/ /index.html last;
}
error_page 404 /404.html; #指定若发生错误返回什么页面
}
server {
listen 80; #监听端口
server_name www.xnkj.ren; #站点名称
return 301 https://$host$request_uri;
}
}