Home > Article > Operation and Maintenance > How to add SSL module to nginx
The specific method is as follows:
(Recommended tutorial: nginx tutorial)
View the original module of nginx
/opt/software/nginx/sbin/nginx -V
The original configure parameters displayed after configure arguments: are as follows:
--prefix=/opt/software/nginx --with-http_stub_status_module
Compile SSL module
Switch to the source package
cd /opt/software/nginx-1.14.1
Compile ssl module
./configure --prefix=/opt/software/nginx --with-http_stub_status_module --with-http_ssl_module
Just run the above command. After the configuration is completed
After the configuration is completed, run the command
make
Do not perform make install here, otherwise it will be an overwriting installation.
Back up Nginx
Then back up the original installed nginx
cp /opt/software/nginx/sbin/nginx /opt/software/nginx/sbin/nginx.bak
Overwrite Nginx
At this time nginx will stop:
View the process and find the process of nginx master.
ps -ef |grep nginx
Close the nginx master process and pay attention to modifying the pid parameters below.
kill -QUIT [nginx master pid]
Then overwrite the original Nginx with the newly compiled Nginx
cp ./objs/nginx /opt/software/nginx/sbin/
Test
Then start nginx, you can still check whether it has been successfully added through the command.
cd /opt/software/
Start
./sbin/nginx
View the installation module
/opt/software/nginx/sbin/nginx -V
The above is the detailed content of How to add SSL module to nginx. For more information, please follow other related articles on the PHP Chinese website!