Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure SSL in nginx

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, Xiaobian will bring you about how to configure SSL in nginx. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.

1. Application for Certificate

Certificate with Alibaba Cloud free version, there are professional version, free version, enhanced version, etc., of course, we are using free money, the term of one year, expired and then apply for it.

2. After applying, follow the background step by step to download the certificate and download the decompressed directory:

3. At this time, Alibaba Cloud has given various configuration schemes.

4、talk is cheap show me the code

5, Restart nginx

./ sbin/nginx -s reload

You can happily use https, visit:https://[your domain name]/interface path to play go

PS: Problems encountered

SSL module may not be installed when installing nginx (exception: unknown directive "ssl" in /usr/local/nginx-0.6.32/conf/nginx.conf:74), and at this time you can not make& make install again, but there is a universal Baidu, a search for a bunch of solutions, record one here, memo.

1$>, Before entering nginx decompression directory, remember not compiled

----》cd /usr/local/src/nginx-1.10.0

2. Configure

----》./ configure -prefix=/usr/local/nginx -with-http_stub_status_module -with-http_ssl_module

3, Make again [Cannot use make&&make install here, Otherwise it will overwrite the original]

----》make

4. Overwrite the original nginx file with the newly generated nginx file under objs

Enter objs

---》cp nginx /usr/local/nginx/sbin/nginx

If you are worried, you can back up the previous one first.

Backup command: mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old

5. Restart ~~ Configuration Certificate ~~ Restart ~~OK

The above is how to configure SSL in nginx shared by Xiaobian. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report