Magento2某生产服务器SSL配置

Nginx+Ubuntu18配置SSL

1. 通过具有sudo特权的用户SSH进入运行HTTP网站的服务器。

2. 添加Certbot PPA

您需要将Certbot PPA添加到存储库列表中。为此,请在计算机上的命令行上运行以下命令:

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update

3.安装Certbot

在计算机上的命令行上运行此命令以安装Certbot。

sudo apt-get install certbot python3-certbot-nginx

4.选择您想如何运行Certbot

  • 获取并安装您的证书…运行此命令以获取证书,并让Certbot自动编辑Nginx配置以为其提供服务,只需一步即可打开HTTPS访问。
sudo certbot --nginx

运行它的时候,提示输入电子邮件:sunyang@shofooshoes.com

提示是否同意它的协议信息:同意,接着输入yes

选择域名输入数字编号,如果是多个域名,数字编号空格隔开

选择是否强制跳转到https,选择是。

下面完整的流程

$ sudo apt-get update
[sudo] password for sunyang:
Hit:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
Get:2 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease [88.7         kB]
Get:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease [88.        7 kB]
Get:4 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main Sources [3        18 kB]
Get:5 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main i386 Packa        ges [676 kB]
Get:6 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 Pack        ages [933 kB]
Get:7 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main Sources [        150 kB]
Get:8 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main amd64 Pac        kages [710 kB]
Get:9 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main i386 Pack        ages [467 kB]
Fetched 3,431 kB in 3s (1,199 kB/s)
Reading package lists... Done
$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-software-properties unattended-upgrades
Suggested packages:
  bsd-mailx needrestart
The following NEW packages will be installed:
  python3-software-properties software-properties-common unattended-upgrades
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 75.3 kB of archives.
After this operation, 762 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 pyth        on3-software-properties all 0.96.24.32.12 [23.6 kB]
Get:2 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 soft        ware-properties-common all 0.96.24.32.12 [10.0 kB]
Get:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 unat        tended-upgrades all 1.1ubuntu1.18.04.14 [41.7 kB]
Fetched 75.3 kB in 2s (35.6 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python3-software-properties.
(Reading database ... 112157 files and directories currently installed.)
Preparing to unpack .../python3-software-properties_0.96.24.32.12_all.deb ...
Unpacking python3-software-properties (0.96.24.32.12) ...
Selecting previously unselected package software-properties-common.
Preparing to unpack .../software-properties-common_0.96.24.32.12_all.deb ...
Unpacking software-properties-common (0.96.24.32.12) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../unattended-upgrades_1.1ubuntu1.18.04.14_all.deb ...
Unpacking unattended-upgrades (1.1ubuntu1.18.04.14) ...
Setting up unattended-upgrades (1.1ubuntu1.18.04.14) ...

Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version
Created symlink /etc/systemd/system/multi-user.target.wants/unattended-upgrades.        service → /lib/systemd/system/unattended-upgrades.service.
Synchronizing state of unattended-upgrades.service with SysV service script with         /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable unattended-upgrades
Setting up python3-software-properties (0.96.24.32.12) ...
Setting up software-properties-common (0.96.24.32.12) ...
Processing triggers for systemd (237-3ubuntu10.40) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
$ sudo add-apt-repository universe
'universe' distribution component enabled for all sources.
Hit:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
Hit:2 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease
Hit:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe i386 Packages [8,531 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8,570 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4,941 kB]
Fetched 22.3 MB in 7s (3,312 kB/s)
Reading package lists... Done
$ sudo add-apt-repository ppa:certbot/certbot
 This is the PPA for packages prepared by Debian Let's Encrypt Team and backport        ed for Ubuntu.

Note: Packages are only provided for currently supported Ubuntu releases.
 More info: https://launchpad.net/~certbot/+archive/ubuntu/certbot
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
Hit:2 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease
Hit:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease [21.3 kB]
Get:6 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 Packages         [8,032 B]
Get:7 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main i386 Packages         [8,028 B]
Get:8 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main Translation-en         [4,176 B]
Fetched 41.5 kB in 3s (14.7 kB/s)
Reading package lists... Done
$ sudo apt-get update
Hit:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
Hit:2 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease
Hit:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Reading package lists... Done
$ sudo apt-get install certbot python3-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-acme python3-certbot python3-configargparse python3-configobj
  python3-future python3-icu python3-josepy python3-mock
  python3-ndg-httpsclient python3-openssl python3-parsedatetime python3-pbr
  python3-pyasn1 python3-pyparsing python3-requests-toolbelt python3-rfc3339
  python3-tz python3-zope.component python3-zope.event python3-zope.hookable
  python3-zope.interface
Suggested packages:
  python3-certbot-apache python-certbot-doc python-acme-doc
  python-certbot-nginx-doc python-configobj-doc python-future-doc
  python-mock-doc python-openssl-doc python3-openssl-dbg python-pyparsing-doc
The following NEW packages will be installed:
  certbot python3-acme python3-certbot python3-certbot-nginx
  python3-configargparse python3-configobj python3-future python3-icu
  python3-josepy python3-mock python3-ndg-httpsclient python3-openssl
  python3-parsedatetime python3-pbr python3-pyasn1 python3-pyparsing
  python3-requests-toolbelt python3-rfc3339 python3-tz python3-zope.component
  python3-zope.event python3-zope.hookable python3-zope.interface
0 upgraded, 23 newly installed, 0 to remove and 5 not upgraded.
Need to get 1,428 kB of archives.
After this operation, 7,868 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-open        ssl all 17.5.0-1ubuntu1 [41.5 kB]
Get:2 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3-        josepy all 1.1.0-2+ubuntu18.04.1+certbot+1 [27.8 kB]
Get:3 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-pbr         all 3.1.1-3ubuntu3 [53.8 kB]
Get:4 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python3-        mock all 2.0.0-3 [47.5 kB]
Get:5 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3-        requests-toolbelt all 0.8.0-1+ubuntu18.04.1+certbot+1 [38.3 kB]
Get:6 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-tz a        ll 2018.3-2 [25.1 kB]
Get:7 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-rfc3        339 all 1.0-4 [6,356 B]
Get:8 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3-        acme all 0.31.0-2+ubuntu18.04.3+certbot+2 [50.7 kB]
Get:9 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-pyas        n1 all 0.4.2-3 [46.8 kB]
Get:10 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python3        -ndg-httpsclient all 0.4.4-1 [23.5 kB]
Get:11 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python3        -configargparse all 0.11.0-1 [22.4 kB]
Get:12 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -configobj all 5.0.6-2+ubuntu18.04.1+certbot+1 [35.5 kB]
Get:13 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 python3        -zope.event all 4.2.0-1 [7,402 B]
Get:14 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-pyp        arsing all 2.2.0+dfsg1-2 [52.2 kB]
Get:15 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -future all 0.15.2-4+ubuntu18.04.1+certbot+3 [333 kB]
Get:16 http://jp.mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python3-icu         amd64 1.9.8-0ubuntu1 [173 kB]
Get:17 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -parsedatetime all 2.4-3+ubuntu18.04.1+certbot+3 [32.4 kB]
Get:18 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -zope.hookable amd64 4.0.4-4+ubuntu18.04.1+certbot+1 [9,532 B]
Get:19 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -zope.interface amd64 4.3.2-1+ubuntu18.04.1+certbot+1 [89.6 kB]
Get:20 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -zope.component all 4.3.0-1+ubuntu18.04.1+certbot+3 [43.1 kB]
Get:21 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -certbot all 0.31.0-1+ubuntu18.04.1+certbot+1 [208 kB]
Get:22 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 certbot         all 0.31.0-1+ubuntu18.04.1+certbot+1 [11.0 kB]
Get:23 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic/main amd64 python3        -certbot-nginx all 0.31.0-1+ubuntu18.04.1+certbot+1 [50.1 kB]
Fetched 1,428 kB in 11s (130 kB/s)
Selecting previously unselected package python3-openssl.
(Reading database ... 112223 files and directories currently installed.)
Preparing to unpack .../00-python3-openssl_17.5.0-1ubuntu1_all.deb ...
Unpacking python3-openssl (17.5.0-1ubuntu1) ...
Selecting previously unselected package python3-josepy.
Preparing to unpack .../01-python3-josepy_1.1.0-2+ubuntu18.04.1+certbot+1_all.de        b ...
Unpacking python3-josepy (1.1.0-2+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-pbr.
Preparing to unpack .../02-python3-pbr_3.1.1-3ubuntu3_all.deb ...
Unpacking python3-pbr (3.1.1-3ubuntu3) ...
Selecting previously unselected package python3-mock.
Preparing to unpack .../03-python3-mock_2.0.0-3_all.deb ...
Unpacking python3-mock (2.0.0-3) ...
Selecting previously unselected package python3-requests-toolbelt.
Preparing to unpack .../04-python3-requests-toolbelt_0.8.0-1+ubuntu18.04.1+certb        ot+1_all.deb ...
Unpacking python3-requests-toolbelt (0.8.0-1+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-tz.
Preparing to unpack .../05-python3-tz_2018.3-2_all.deb ...
Unpacking python3-tz (2018.3-2) ...
Selecting previously unselected package python3-rfc3339.
Preparing to unpack .../06-python3-rfc3339_1.0-4_all.deb ...
Unpacking python3-rfc3339 (1.0-4) ...
Selecting previously unselected package python3-acme.
Preparing to unpack .../07-python3-acme_0.31.0-2+ubuntu18.04.3+certbot+2_all.deb         ...
Unpacking python3-acme (0.31.0-2+ubuntu18.04.3+certbot+2) ...
Selecting previously unselected package python3-pyasn1.
Preparing to unpack .../08-python3-pyasn1_0.4.2-3_all.deb ...
Unpacking python3-pyasn1 (0.4.2-3) ...
Selecting previously unselected package python3-ndg-httpsclient.
Preparing to unpack .../09-python3-ndg-httpsclient_0.4.4-1_all.deb ...
Unpacking python3-ndg-httpsclient (0.4.4-1) ...
Selecting previously unselected package python3-configargparse.
Preparing to unpack .../10-python3-configargparse_0.11.0-1_all.deb ...
Unpacking python3-configargparse (0.11.0-1) ...
Selecting previously unselected package python3-configobj.
Preparing to unpack .../11-python3-configobj_5.0.6-2+ubuntu18.04.1+certbot+1_all        .deb ...
Unpacking python3-configobj (5.0.6-2+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-future.
Preparing to unpack .../12-python3-future_0.15.2-4+ubuntu18.04.1+certbot+3_all.d        eb ...
Unpacking python3-future (0.15.2-4+ubuntu18.04.1+certbot+3) ...
Selecting previously unselected package python3-parsedatetime.
Preparing to unpack .../13-python3-parsedatetime_2.4-3+ubuntu18.04.1+certbot+3_a        ll.deb ...
Unpacking python3-parsedatetime (2.4-3+ubuntu18.04.1+certbot+3) ...
Selecting previously unselected package python3-zope.hookable.
Preparing to unpack .../14-python3-zope.hookable_4.0.4-4+ubuntu18.04.1+certbot+1        _amd64.deb ...
Unpacking python3-zope.hookable (4.0.4-4+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-zope.interface.
Preparing to unpack .../15-python3-zope.interface_4.3.2-1+ubuntu18.04.1+certbot+        1_amd64.deb ...
Unpacking python3-zope.interface (4.3.2-1+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-zope.event.
Preparing to unpack .../16-python3-zope.event_4.2.0-1_all.deb ...
Unpacking python3-zope.event (4.2.0-1) ...
Selecting previously unselected package python3-zope.component.
Preparing to unpack .../17-python3-zope.component_4.3.0-1+ubuntu18.04.1+certbot+        3_all.deb ...
Unpacking python3-zope.component (4.3.0-1+ubuntu18.04.1+certbot+3) ...
Selecting previously unselected package python3-certbot.
Preparing to unpack .../18-python3-certbot_0.31.0-1+ubuntu18.04.1+certbot+1_all.        deb ...
Unpacking python3-certbot (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package certbot.
Preparing to unpack .../19-certbot_0.31.0-1+ubuntu18.04.1+certbot+1_all.deb ...
Unpacking certbot (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-pyparsing.
Preparing to unpack .../20-python3-pyparsing_2.2.0+dfsg1-2_all.deb ...
Unpacking python3-pyparsing (2.2.0+dfsg1-2) ...
Selecting previously unselected package python3-certbot-nginx.
Preparing to unpack .../21-python3-certbot-nginx_0.31.0-1+ubuntu18.04.1+certbot+        1_all.deb ...
Unpacking python3-certbot-nginx (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Selecting previously unselected package python3-icu.
Preparing to unpack .../22-python3-icu_1.9.8-0ubuntu1_amd64.deb ...
Unpacking python3-icu (1.9.8-0ubuntu1) ...
Setting up python3-requests-toolbelt (0.8.0-1+ubuntu18.04.1+certbot+1) ...
Setting up python3-pbr (3.1.1-3ubuntu3) ...
update-alternatives: using /usr/bin/python3-pbr to provide /usr/bin/pbr (pbr) in         auto mode
Setting up python3-mock (2.0.0-3) ...
Setting up python3-zope.event (4.2.0-1) ...
Setting up python3-icu (1.9.8-0ubuntu1) ...
Setting up python3-pyparsing (2.2.0+dfsg1-2) ...
Setting up python3-zope.interface (4.3.2-1+ubuntu18.04.1+certbot+1) ...
Setting up python3-configargparse (0.11.0-1) ...
Setting up python3-zope.hookable (4.0.4-4+ubuntu18.04.1+certbot+1) ...
Setting up python3-pyasn1 (0.4.2-3) ...
Setting up python3-future (0.15.2-4+ubuntu18.04.1+certbot+3) ...
update-alternatives: using /usr/bin/python3-futurize to provide /usr/bin/futuriz        e (futurize) in auto mode
update-alternatives: using /usr/bin/python3-pasteurize to provide /usr/bin/paste        urize (pasteurize) in auto mode
Setting up python3-openssl (17.5.0-1ubuntu1) ...
Setting up python3-ndg-httpsclient (0.4.4-1) ...
Setting up python3-josepy (1.1.0-2+ubuntu18.04.1+certbot+1) ...
Setting up python3-configobj (5.0.6-2+ubuntu18.04.1+certbot+1) ...
Setting up python3-tz (2018.3-2) ...
Setting up python3-parsedatetime (2.4-3+ubuntu18.04.1+certbot+3) ...
Setting up python3-rfc3339 (1.0-4) ...
Setting up python3-zope.component (4.3.0-1+ubuntu18.04.1+certbot+3) ...
Setting up python3-acme (0.31.0-2+ubuntu18.04.3+certbot+2) ...
Setting up python3-certbot (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Setting up certbot (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Created symlink /etc/systemd/system/timers.target.wants/certbot.timer → /lib/sys        temd/system/certbot.timer.
certbot.service is a disabled or a static unit, not starting it.
Setting up python3-certbot-nginx (0.31.0-1+ubuntu18.04.1+certbot+1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
$ sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): sunyang@shofooshoes.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: jp.shoesflash.com
2: www.shoesflash.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1 2
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for jp.shoesflash.com
http-01 challenge for www.shoesflash.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/magento2
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/magento2

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/magento2
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/magento2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://jp.shoesflash.com and
https://www.shoesflash.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=jp.shoesflash.com
https://www.ssllabs.com/ssltest/analyze.html?d=www.shoesflash.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/jp.shoesflash.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/jp.shoesflash.com/privkey.pem
   Your cert will expire on 2020-08-14. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

$

如果m2后台打开不了,不停的重定向,那么你还需要设置下magento2

原因大概是在安装的时候,路径设置的是http 不是https

解决办法:

php bin/magento setup:store-config:set --use-secure=1 --use-secure-admin=1 --base-url-secure="https://www.shoesflash.com/"
php bin/magento cache:flush

参考:
https://www.zuimoban.com/magento/tutorials/35.html

https://letsencrypt.org/

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用*标注