Table of contents

Start error: nginx: [emerg] https protocol requires SSL support

Nginx Jun 11, 2020 Viewed 948 Comments 0


In the nginx.conf file, if we use the following directive.

  • Add the ssl configuration, for example:
server {
    listen       443 ssl;

    root /wwwroot;
    ssl_certificate     /wwwroot/;
    ssl_certificate_key /wwwroot/;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
  • With reverse proxy. If the proxied server is a https server, for example:
location /some/path/ {

When we start nginx, there may be an error as follow.

nginx: [emerg] https protocol requires SSL support in /opt/nginx-1.17.8/conf/server.conf:9


We can configure nginx again, and with --with-http_ssl_module. To enable ngx_http_ssl_module.

$ ./configure --prefix=/opt/nginx-1.17.8 --with-http_ssl_module
$ make
$ sudo make install
Updated Jun 11, 2020