用的是/usr/local/nginx/conf/enable-ssl-example.conf 配置,证书已修改为自己的证书,reload时提示如下错误:
Reload service nginx... nginx: [emerg] "server" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:2
系统为debian9.2 阿里云主机
详细配置如下:
server
{
listen 443 ssl http2;
#listen [::]:443 ssl http2;
server_name xxx.com;
index index.html index.htm index.php default.html default.htm default.php;