nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:41
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
This is because the lack of http_ssl_module nginx module, bring fade --with-http_ssl_module configuration when compiled and installed on the line, but if you have installed the nginx, how to add modules it?
1. Switch to Source Package:
cd /opt/nginx/nginx-1.10.2/ (replace package source directory can be for their own)
2. View the original module nginx
nginx -V
The original configuration information is as follows:
--pref=/usr/local/nginx
3.运行命令:./configure --pref=/usr/local/nginx --with-http_ssl_module
4. Run make (here do not make install, otherwise it will cover the installation)
cp / usr / local / nginx / sbin / nginx /usr/local/nginx/sbin/nginx.bak: 5. Backup original good installed nginx
6. Stop running nginx: nginx -s stop
7. compiled nginx will just overwrite the original nginx: cp ./objs/nginx / usr / local / nginx / sbin / nginx
8. Start nginx: nginx
9. Run: nginx -V see whether Added