错误笔记
错误1
[emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx
错误2
nginx: [alert] could not open error log file: open() "/data/webserver/test/sbin/nginx/logs/error.log" failed (20: Not a directory) 2021/07/08 15:34:15 [emerg] 31978#0: open() "/data/webserver/test/sbin/nginx/conf/nginx.conf" failed (20: Not a directory)
解决办法:
a、创建好你的nginx存放目录之后,来到nginx安装目录
./configure --prefix=/data/webserver/test/ --with-http_stub_status_module --with-http_ssl_module
b、编译,安装
make && make install
c、先启动安装好的nginx,配置待会再配
./nginx //确保没报错,应该不会报错的
d、来到conf目录下,创建cert目录用于存放证书位置