Download resources - high school teacher writes chicken soup article and becomes popular: life is expensive, please don't waste it

 Blogger: Li None but Li 2017-08-28 thirty thousand five hundred and thirty-three 9 comments
Summary: I want to change Linux these days, so I used the control panel of amh. At present, if wdcp uses ssl, I have to edit the configuration file manually. I haven't succeeded, because ssl is very secure now, and it is estimated that many websites will change soon

I want to change Linux these days, so I use the amh control panel. At present, if wdcp uses ssl, I have to edit the configuration file manually, and I haven't succeeded, because ssl is very secure now. It is estimated that many websites will change to https before long. Of course, now there are many personal blogs, which have been changed to https, For those who are still hesitating to change, you can collect some methods to deal with. Here is a brief introduction to the method of forcing ssl jump on Amh Nginx.

 Life is expensive. Please don't waste it. jpg

There are a lot of free ssl certificates on the Internet, but I won't say much about how to apply here. Baidu, Alibaba Cloud and Tencent Cloud have them and can download them. After all, Votone's free SSL has stopped issuing.

Ha ha H1

Ha ha H2

Ha ha H3

Ha ha H4

Ha ha H5
Ha ha H6

1. Add article content
2、 Add article content
3、 Add article content

Add article content

Add article content

Add article content

Add article content

Add article content

Add article content

I won't go into details about this. Let's talk about how to enable forced ssl:

In preliminary preparation, you need to install amrewrite-1.5 pseudo static plug-in, then create a website and specify pseudo static rules. Then ensure that the website can be accessed normally SSL URL, and then fill in the Rewrite rule as follows:

 Markup
 if ($server_port = 80) {    return 301 https://$server_name$request_uri;     }    if ($scheme = http) {    return 301 https://$server_name$request_uri;     }    error_page 497 https://$server_name$request_uri;

It can also be written as follows:

 Markup
 if ( $host = 'liyangblog.cn' ){   rewrite ^/(.*)$  http://www.liyangblog.cn/ $1 permanent;    } if ($scheme = http ) { rewrite ^(.*)$ https://$host$1 permanent; }

After saving, restart nginx. (After configuring pseudo static under amh, you will be prompted that the pseudo static rule is successful and automatically restarted to load) If it is not amh, you need to run the following command to restart:

sudo service nginx restart

The following codes can be added to the domain name to be blocked:

If you understand this refresh correctly, it should be refreshed at the first time of entry.

Summary:

SSL will become the mainstream in the future. Many official websites have paid more and more attention to ssl. Of course, if you configure ssl, some problems need to be handled slowly, because some plug-ins do not support https, but they will support it in the future. If you enable https and cannot use Baidu to share, you can refer to this: Baidu shares an image text tutorial that supports https According to this operation, Baidu Share can support https. Well, do it yourself.

The last editing time of the article: 2023-03-27 15:30:45
share