{"id":576,"date":"2024-08-15T17:48:02","date_gmt":"2024-08-15T09:48:02","guid":{"rendered":"https:\/\/thereisno.top:4430\/?p=576"},"modified":"2024-08-15T17:48:03","modified_gmt":"2024-08-15T09:48:03","slug":"apache2-https%e9%85%8d%e7%bd%ae-2","status":"publish","type":"post","link":"https:\/\/thereisno.top\/?p=576","title":{"rendered":"Apache2 https\u914d\u7f6e"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">vi \/etc\/apache2\/sites-available\/default-ssl.conf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u6dfb\u52a0\u8bc1\u4e66\u4fe1\u606f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; SSLEngine on<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; # &nbsp; A self-signed (snakeoil) certificate can be created by installing<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; # &nbsp; the ssl-cert package. See<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; # &nbsp; \/usr\/share\/doc\/apache2\/README.Debian.gz for more info.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; # &nbsp; If both key and certificate are stored in the same file, only the<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &nbsp; &nbsp; # &nbsp; SSLCertificateFile directive is needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; # &nbsp; &nbsp; SSLCertificateFile&nbsp; &nbsp; &nbsp; \/etc\/ssl\/certs\/ssl-cert-snakeoil.pem<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; # &nbsp;&nbsp;&nbsp; SSLCertificateKeyFile \/etc\/ssl\/private\/ssl-cert-snakeoil.key<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00a0\u00a0SSLCertificateFile\u00a0 \u00a0 \u00a0 \/etc\/letsencrypt\/live\/\u4f60\u7684\u8bc1\u4e66\u76ee\u5f55\/fullchain.pem<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00a0 SSLCertificateKeyFile \/etc\/letsencrypt\/live\/\u4f60\u7684\u8bc1\u4e66\u76ee\u5f55\/privkey.pem<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u8fd0\u884c\u547d\u4ee4a2enmod&nbsp; ssl \u5f00\u542fSSL\u6a21\u5757\u5f88\u91cd\u8981 \/\u5173\u95eda2dismod ssl<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u8fd0\u884c\u547d\u4ee4a2ensite default-ssl.conf\u542f\u7528ssl\u7ad9\u70b9\u5f88\u91cd\u8981<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u91cd\u542fApache2\u6216\u8005 service apache2 reload<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5\u3001apachectl configtest&nbsp;&nbsp; # \u68c0\u67e5apache\u914d\u7f6e\u662f\u5426\u6b63\u786e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>vi \/etc\/apache2\/sites-available\/default-ssl.conf 1\u3001\u6dfb\u52a0\u8bc1\u4e66 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/thereisno.top\/?p=576\" 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":[116,16],"tags":[115,114],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-apache2","category-linux","tag-apache2","tag-ssl"],"_links":{"self":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/576","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=576"}],"version-history":[{"count":1,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/576\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}