current position:Home>Problems encountered when deploying HTTPS certificates using docker nginx

Problems encountered when deploying HTTPS certificates using docker nginx

2022-02-03 01:13:33 CSDN Q & A

Exit the container directly every time it is created successfully ,

The log keeps reporting errors :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

Configuration is :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;            # Set whether a process accepts multiple network connections at the same time , The default is off    worker_connections  1024;   # Maximum number of links }http {        include       mime.types;                       # File extension and file type mapping         default_type  application/octet-stream; # Default file type , The default value is text/plain        access_log    /var/log/nginx/access.log;        sendfile      on;        server {                listen      443;                         # Listening port                 server_name www.xnkj.ren;               # Site name                 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;     # The folder where the home page is located                         index   index.html index.htm;           # Home page location                         try_files $uri $uri/ /index.html last;                }                error_page 404 /404.html;                       # Specify what page to return if an error occurs         }        server {                listen      80;                         # Listening port                 server_name www.xnkj.ren;               # Site name                 return 301 https://$host$request_uri;        }}



Refer to the answer 1:

I just want to ask , Is the firewall off ?




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030113307433.html

Random recommended