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

Installation of SSL Certificate and how to configure WordPress CDN under Linux Nginx

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge about "how to install SSL Certificates and configure WordPress CDN under Linux Nginx." In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1, Nginx install SSL Certificates

Two profiles are required

(Note: Please backup the server configuration file you need to modify before installing the certificate)

1_root_bundle.crt;

2_domainname.com.key。

Note: These three certificate files are in the folder for nginx.zip. For example, 1_root_bundle.crt is the root certificate chain (public key), and 2_domainname.com.key is the private key.

(The certificate public key and private key files are generally named after your domain name; the nature of the certificate suffix crt and cer is the same).

Second, nginx certificate code modification

1. Open the nginx.conf file in the conf directory under the nginx installation directory. Ali Cloud Virtual Machine is located at/alidata/server/nginx/conf/nginx.conf.

Find:

# https server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols sslv2 sslv3 tlsv1; # ssl_ciphers all:! adh:! export56:rc4+rsa:+high:+medium:+low:+sslv2:+exp; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #}

Amend it to read:

server { listen 443; server_name localhost; ssl on; ssl_certificate 1_root_bundle.crt; (Certificate Public Key) ssl_certificate_key 2_ domainname.com.key; (Certificate private key) ssl_session_timeout 5m; ssl_protocols tlsv1 tlsv1.1 tlsv1.2; ssl_ciphers aesgcm:all:! dh:! export:! rc4:+high:! medium:! low:! anull:! enull; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; }

Note: Please keep the configuration of website path and default page consistent with port 80 after configuration.

2. Local test access.

If you test locally, please do local resolution access: open the system disk:\windows\system32\drivers\etc\hosts file, modify it with a text editor, and resolve the domain name bound by the certificate to the local ip.

3. The effect after completing the configuration.

Start nginx and access https://+ certificate bound domain name

Note: If the website cannot be accessed normally through https after deployment, you can confirm whether port 443 of the server is open or intercepted by acceleration tools such as website guards.

(1) Open method: firewall settings-exception port-add port 443 (tcp).

(2) If intercepted by security or acceleration tools, you can add 443 to the trust list in the interception record.

After reboot, access again via https.

Third, wordpress configuration (2 ways: Qiniu and Ali oss)

The first type: download https plug-in and Qiniu cloud storage plug-in, the plug-in configuration is as follows.

https plugin:

Qiniu cloud storage plug-in:(my pictures are saved in Qiniu object storage)

Fig. 1

Fig. 2

Second: OSS configuration is as follows

2. Modify external links, that is, links that are unsafe factors. My blog website mainly has the following several needs to be modified.

a. Baidu statistics modification (supported);b. Baidu sharing modification (not supported, need to localize Baidu sharing);c. Theme image modification (one by one);d. Image modification in content;e. Sina attention button localization (who knows can share with bloggers)

IV. cdn configuration

www domain name directly upload certificate and key in aliyun, back to the source select 443, if you can not leave a message to cancel js loading.

Finally you should be able to configure ssl completely.

"Linux Nginx under the installation of SSL Certificates and WordPress CDN how to configure" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

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