The certificate has been obtained, the nginx, has been configured and the ssl module has been installed, and the 443 interface has not been started after restart.

the following is the nginx configuration, and the restart did not report an error, but the 443 interface did not start. Want to know why?


-sharpuser  nobody;
worker_processes  1;

-sharperror_log  logs/error.log;
-sharperror_log  logs/error.log  notice;
-sharperror_log  logs/error.log  info;

-sharppid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    -sharplog_format  main  "$remote_addr - $remote_user [$time_local] "$request" "
    -sharp                  "$status $body_bytes_sent "$http_referer" "
    -sharp                  ""$http_user_agent" "$http_x_forwarded_for"";

    -sharpaccess_log  logs/access.log  main;

    sendfile        on;
    -sharptcp_nopush     on;

    -sharpkeepalive_timeout  0;
    keepalive_timeout  65;

    -sharpgzip  on;


    server {
        listen       80;
        server_name xx.com  www.xx.com;

        -sharpcharset koi8-r;

        -sharpaccess_log  logs/host.access.log  main;

        location / {
         proxy_pass http://127.0.0.1:9339;
        -sharproot   /;
            -sharpindex  index.html index.htm;
        }

        -sharperror_page  404              /404.html;

        -sharp redirect server error pages to the static page /50x.html
        -sharp
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        -sharp proxy the PHP scripts to Apache listening on 127.0.0.1:80
        -sharp
        -sharplocation ~ \.php$ {
        -sharp    proxy_pass   http://127.0.0.1;
        -sharp}

        -sharp pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        -sharp
        -sharplocation ~ \.php$ {
        -sharp    root           html;
        -sharp    fastcgi_pass   127.0.0.1:9000;
        -sharp    fastcgi_index  index.php;
        -sharp    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        -sharp    include        fastcgi_params;
        -sharp}

        -sharp deny access to .htaccess files, if Apache"s document root
        -sharp concurs with nginx"s one
        -sharp
        -sharplocation ~ /\.ht {
        -sharp    deny  all;
        -sharp}
    }


    -sharp another virtual host using mix of IP-, name-, and port-based configuration
    -sharp
    server {
        listen       80;
    -sharp    listen       somename:8080;
        server_name  myterm.xx.com;

        location / {
    -sharp        root   html;
    -sharp        index  index.html index.htm;
    proxy_pass  http://www.yozosann.com:8256/;
        }
    }


    -sharp HTTPS server
    -sharp
    server {
         listen       443;
         server_name  xx.com  www.xx.com;

         ssl                  on;
         ssl_certificate      /usr/local/nginx/ssl/www.xx.com-ca-bundle.crt;
         ssl_certificate_key  /usr/local/nginx/ssl/www.xx.com.key;

         ssl_session_timeout  5m;

         ssl_protocols  SSLv2 SSLv3 TLSv1;
         ssl_ciphers  HIGH:!aNULL:!MD5;
         ssl_prefer_server_ciphers   on;

        location / {
             proxy_pass http://127.0.0.1:9339;
    -sharp        root   html;
    -sharp        index  index.html index.htm;
         }
     }

}
Mar.12,2021

take a look at the Nginx log


encountered the same problem. I wonder if the landlord has solved it.


I use Tencent Cloud, which is the same problem. When I check the log, I find that there is a sentence in the error log: the "ssl" parameter requires ngx_http_ssl_module in / usr/local/nginx/conf/nginx.conf:36

but I have installed the ssl module, and then, for some reason, I did the following:

nginx -s stop
nginx

is fine, and then I tried it again. I can't do it directly nginx-s reload . Although I don't know why, at least the problem has been solved

.
Menu