{"id":31,"date":"2019-05-13T13:41:03","date_gmt":"2019-05-13T05:41:03","guid":{"rendered":"https:\/\/thereisno.top:4430\/?p=31"},"modified":"2019-05-13T13:41:03","modified_gmt":"2019-05-13T05:41:03","slug":"apache2-https%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/thereisno.top\/?p=31","title":{"rendered":"Apache2 https\u914d\u7f6e"},"content":{"rendered":"\n<p>\u4e00\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\/etc\/apache2\/sites-available\/default-ssl.conf<\/p>\n\n\n\n<p>1\u3001\u6dfb\u52a0\u8bc1\u4e66\u4fe1\u606f<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; SSLEngine on<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; # &nbsp; A self-signed (snakeoil) certificate can be created by installing<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; # &nbsp; the ssl-cert package. See<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; # &nbsp; \/usr\/share\/doc\/apache2\/README.Debian.gz for more info.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; # &nbsp; If both key and certificate are stored in the same file, only the<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; # &nbsp; SSLCertificateFile directive is needed.<\/p>\n\n\n\n<p>&nbsp; # &nbsp;\n&nbsp; SSLCertificateFile&nbsp;\n&nbsp; &nbsp; \/etc\/ssl\/certs\/ssl-cert-snakeoil.pem<\/p>\n\n\n\n<p>&nbsp; # &nbsp;&nbsp;&nbsp; SSLCertificateKeyFile\n\/etc\/ssl\/private\/ssl-cert-snakeoil.key<\/p>\n\n\n\n<p>\u00a0\u00a0SSLCertificateFile\u00a0 \u00a0 \u00a0 \/etc\/letsencrypt\/live\/yourdomain.com\/fullchain.pem<\/p>\n\n\n\n<p>\u00a0 SSLCertificateKeyFile \/etc\/letsencrypt\/live\/yourdomain.com\/privkey.pem<\/p>\n\n\n\n<p>\u4e8c\u3001\u8fd0\u884c\u547d\u4ee4a2enmod\u00a0 ssl \u5f00\u542fSSL\u6a21\u5757\u5f88\u91cd\u8981 \/\u5173\u95eda2dismod ssl<\/p>\n\n\n\n<p>\u4e09\u3001\u8fd0\u884c\u547d\u4ee4a2ensite default-ssl.conf\u542f\u7528ssl\u7ad9\u70b9\u5f88\u91cd\u8981<\/p>\n\n\n\n<p>\u56db\u3001\u91cd\u542fApache2\u6216\u8005 service apache2 reload<\/p>\n\n\n\n<p>\u4e94\u3001apachectl configtest\u00a0\u00a0 # \u68c0\u67e5apache\u914d\u7f6e\u662f\u5426\u6b63\u786e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 \/etc\/apache2\/sites-available\/default-ssl.conf  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/thereisno.top\/?p=31\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cApache2 https\u914d\u7f6e\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":1,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}