php convert http to https applet deployment online

Wow,,,,, I've been doing it for a long time! ! ! It's actually very, very simple! ! ! !

The first contact, I was confused, and then suddenly I tried it and it was ok,,, I can access https,,,, I started to report a lot of errors, such as 502 Bad Gateway,,, 404 Not Found and other errors,,,, everyone It was said that it was a configuration problem. Baidu later said that it was a series of problems such as browsers and firewalls. After trying a lot, it was not the case, and it did not concern those things! ! ! The following operations hope to be helpful to PHP members. I am using Ubuntu, but they are all operated under Linux, and Centos should also be able to! ! ! ! ! I see java also just write it into another server! You can do it step by step! ! ! So it doesn't matter if you say it~~~~· Hurry up and try it!

1. Go to Alibaba Cloud CA certificate to apply for a certificate for free, click Completion, and fill in your domain name! ! ! In order to facilitate the access of the applet number, but when filling in personal information, you must tick it, otherwise the review will take a long time and may not be successful! ! ! Follow the steps to apply

 

2. After passing, its certificate status will change to issued, and then click the download on the right to operate https! There are step-by-step tutorials, just follow along

3. Find out the configuration file of your domain name to edit, enter your configuration file to edit (the configuration file here is the location of your domain name configuration file, whether you are a first-level domain name or a second-level domain name)

4. Enter the configuration file to configure,,, I put port 80 and port 443 together, at first I rewrote a server below it, and wrote the steps for applying for a certificate below,, , after saving and exiting, a 502 error is reported, or it is a 404 error, the whole head is big,, and then I tried the following methods and the result was successful

# nginx -t Check if the configuration is correct

# service nginx restart restart configuration file

5. After the configuration is completed and restarted, access the browser. If you can successfully access https, it means that you are free, and then enter the merchant's public platform to upload the front-end code of the applet. Open the WeChat applet editor and click upload

Please note that before uploading, you must change the appid of the applet to the merchant's, and then change the background data address of the link to https://domain name before uploading, otherwise there is no data when the mobile phone scans and logs in.

6. Enter the public platform to log in. After logging in, click Development Settings in the Settings on the left sidebar to set the server domain name. The domain name filled in is the domain name of your server.

Then see your mood below, if you want to set it, set it, and then click on the development management, the bottom development version, first click on the uploaded project. There is an experience version in the lower left corner, please scan and check if there is no problem, and then click Submit for review and other operations! ! ! ! ! ! ! ! You're done, take a break~~~~~~

Expand it to see if you reported the following error! ! ! !

 1. 502 Bad Gateway error    

        404 Not Found error   

      

 

 It is said that my configuration is wrong. So far, I still don't know what is wrong. Then I went to the error log and reported the following error.

I still can't know what this error is, no solution... I was frustrated for a long time! ! ! ! !

There is also a friend's introduction here is another way of writing,,, let me show you yo~~~~~~~~~

   

Then I can't access the server,,,, you can try, anyway, this is how I am

 The writing method of JAVA is similar (all of them have been tried by me)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325854427&siteId=291194637