Configure https on the basis of existing Nginx

View ngixn version and compile parameters
/usr/local/nginx/sbin/nginx -V



Back up what you have:

cp /usr/local/nginx/sbin/nginx    /usr/local/nginx/sbin/nginx.bak


Configure a new module with ssl

./configure --prefix=/usr/local/nginx --with-http_ssl_module
(nginx.conf configuration file, will use the conf folder)

compile
make and

replace the previous one (the service needs to be stopped before replacement):
cp objs/ nginx /usr/local/nginx/sbin/nginx


Restart:

./nginx



Reference: http://www.cnblogs.com/zhming26/p/6278667.html

Guess you like

Origin blog.csdn.net/zwx_lucky/article/details/80658766