Home  >  Article  >  Operation and Maintenance  >  Detailed process of nginx configuring https

Detailed process of nginx configuring https

王林
王林forward
2021-01-21 10:27:105122browse

Detailed process of nginx configuring https

The detailed configuration process is as follows:

(Learning video sharing: Programming video)

1. Download the SSL certificate

2. Put the two certificates in the cert directory and then put them in the same directory as nginx and nginx.conf

3. Go to the nginx decompression directory and execute

./configure --with-http_ssl_module

If an error is reported./ configure: error: SSL modules require the OpenSSL library. Then execute

yum -y install openssl openssl-devel
./configure
./configure --with-http_ssl_module

4. Execute make (remember not to make install which will overwrite the installation directory)

5. Back up the original nginx

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

6. Overwrite the old installation directory with the new nginx

cp objs/nginx /usr/local/nginx/sbin/nginx

If an error is reported, execute

cp -rfp objs/nginx /usr/local/nginx/sbin/nginx

to complete.

Related recommendations: nginx tutorial

The above is the detailed content of Detailed process of nginx configuring https. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete