Home > Operation and Maintenance > Nginx > How to add SSL module to nginx

How to add SSL module to nginx

王林
Release: 2020-09-18 17:18:55
forward
2597 people have browsed it

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
Copy after login

The original configure parameters displayed after configure arguments: are as follows:

--prefix=/opt/software/nginx --with-http_stub_status_module
Copy after login

Compile SSL module

Switch to the source package

cd /opt/software/nginx-1.14.1
Copy after login

Compile ssl module

./configure --prefix=/opt/software/nginx --with-http_stub_status_module --with-http_ssl_module
Copy after login

Just run the above command. After the configuration is completed

After the configuration is completed, run the command

make
Copy after login

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
Copy after login

Overwrite Nginx

At this time nginx will stop:

View the process and find the process of nginx master.

ps -ef |grep nginx
Copy after login

Close the nginx master process and pay attention to modifying the pid parameters below.

kill -QUIT [nginx master pid]
Copy after login

Then overwrite the original Nginx with the newly compiled Nginx

cp ./objs/nginx /opt/software/nginx/sbin/
Copy after login

Test

Then start nginx, you can still check whether it has been successfully added through the command.

cd /opt/software/
Copy after login

Start

./sbin/nginx
Copy after login

View the installation module

/opt/software/nginx/sbin/nginx -V 
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template