In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to configure the environment on the Server side of WeChat Mini Programs". In the daily operation, I believe many people have doubts about how to configure the environment on the Server side of WeChat Mini Programs. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to configure the environment on the Server side of WeChat Mini Programs". Next, please follow the editor to study!
Application for SSL Certificate
Https needs to use a SSL certificate. The price of this certificate ranges from 35, 000 to 10, 000 per year. For small teams or users who want to be familiar with Mini Program, the price is relatively high. In this case, you can choose a free certificate. In addition, you can also consider that cloud services, such as dingo and LeanCloud, all support https, if these platforms can meet their business needs. It saves a lot of trouble.
Free certificate: Symantec free DV SSL on Aliyun
Application process
Wanwang.aliyun.com
Log in to the console and click Security-> Certificate Services in the left menu. There is a purchase certificate button in the upper right corner of this page. Click to enter the purchase page, select free DV SSL, and purchase.
The order amount is 0 yuan, just go through the purchase process, return to the certificate service page after completion, and you can see a certificate in the list.
First of all, complete the operation and fill in your domain name and basic information.
After that, the "completion" connection will change to "progress". After clicking, follow the prompt, mainly to verify my own server. I chose file verification, download a file and upload it to my server, waiting for verification.
After verifying that there is no problem, you can download the SSL certificate in about 10 minutes
Nginx HTTPS configuration
Upload the certificate to the nginx directory, for example
/ usr/local/nginx/cert
Modify conf/nginx.conf
Configure HTTPS server blocks and add SSL configuration
# HTTPS server#server {listen 443 ssl; server_name localhost;. Ssl on; ssl_certificate / usr/local/nginx/cert/213994146300992.pem; ssl_certificate_key / usr/local/nginx/cert/213994146300992.key; ssl_session_timeout 5m; ssl_ciphers ECDHEMurRSA, AES128Muir, GCMMerSHA256, ECDH, HIGH, AEHH, null, MD5, MD5, ADH, RC4, ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / {root html; index index.html index.htm;}. }
Reload the configuration file, and use https to access your domain name in the browser to see if it can be accessed properly.
Upgrade to TLS 1.2 to view the TLS version
After visiting https url, there will be a small green lock icon in front of the address bar. Click it to see the TLS version information.
If you don't reach 1.2, you need to upgrade.
The following operating environment is centos linux
1) View the openssl version
Https://www.openssl.org/source/
Versions below 1.0.2 will be upgraded, and previous versions have officially stopped maintenance.
2) upgrade openssl
Go to the official website to download the new version
Https://www.openssl.org/source/
For example, download to / usr/local
Upgrade
Cd / usr/localtar zxvf openssl-1.0.2j.tar.gz cd openssl-1.0.2j. / config-- prefix=/usr/local/openssl make & & make install mv / usr/bin/openssl / / usr/bin/openssl.OFF mv / usr/include/openssl / / usr/include/openssl.OFF ln-s / / usr/local/openssl/bin/openssl / / usr/bin/openssl ln-s / / usr/local/openssl/include/openssl / / usr/include / openssl echo "/ usr/local/openssl/lib" / > > / etc/ld.so.conf ldconfig-v
Verification
Openssl version-a
3) recompile nginx
After upgrading OpenSSL, nginx needs to be recompiled, otherwise TLS is still the old version
Here is the basic installation. If you need more, please adjust it yourself.
The software used
Openssl
It has been installed before.
Pcre
Download address
Http://www.pcre.org/
For example, download to / usr/local
Cd / usr/localtar-zxv-f pcre-8.39.tar.gzcd pcre-8.39./configure-- prefix=/usr/local/pcre/make & & make install
Zlib
Download address
Http://www.zlib.net/
For example, download to / usr/local
Cd / usr/localtar-zxv-f zlib-1.2.10.tar.gzcd zlib-1.2.10./configure-- prefix=/usr/local/zlib/make & & make install
Compile nginx
Tar-zxvf nginx-1.10.2.tar.gzcd nginx-1.10.2./configure /-- user= users /-group= group /-- prefix=/usr/local/nginx /-- with-http_ssl_module /-- with-openssl=/usr/local/openssl-1.0.2j /-- with-pcre=/usr/local/pcre-8.39 /-- with-zlib=/usr/local/zlib-1.2.10 /-- with-http_stub_status_module /-- with-threadsmake & & make install
After the compilation is complete, remember to modify the configuration file and add the relevant information about SSL
Then start nginx and visit https url to verify the TSL version again
At this point, the study on "how to configure WeChat Mini Programs's Server environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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: 275
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.