{"id":134,"date":"2021-01-13T12:58:51","date_gmt":"2021-01-13T04:58:51","guid":{"rendered":"https:\/\/www.ssle.cn\/help\/?p=134"},"modified":"2022-01-13T12:59:27","modified_gmt":"2022-01-13T04:59:27","slug":"phpstudy-an-zhuang-ssl-zheng-shu","status":"publish","type":"post","link":"https:\/\/ssle.cn\/help\/phpstudy-an-zhuang-ssl-zheng-shu\/","title":{"rendered":"PHPStudy \u5b89\u88c5SSL\u8bc1\u4e66"},"content":{"rendered":"<p>1.\u4e0b\u8f7dSSL\u8bc1\u4e66\u5e76\u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/p>\n<p>\u767b\u5f55\u4f1a\u5458\u4e2d\u5fc3\uff1ahttps:\/\/ssle.cn<\/p>\n<p>\u7ba1\u7406SSL\u8bc1\u4e66 -&gt; \u8ba2\u5355\u8be6\u7ec6 -&gt; \u4e0b\u8f7dSSL\u8bc1\u4e66 -&gt; \u9009\u62e9 [Apache] , \u70b9\u51fb[\u4e0b\u8f7dSSL\u8bc1\u4e66]<\/p>\n<pre>yourdomain.com.crt \u00a0 \u00a0 (\u670d\u52a1\u5668\u8bc1\u4e66)\r\nyourdomain.com.key \u00a0   (\u79c1\u94a5\u6587\u4ef6\uff09\u5982\u679c\u4e3a\u7a7a\u8bf7\u5c06\u751f\u6210CSR\u65f6\u4fdd\u5b58\u7684\u79c1\u94a5\u5185\u5bb9\u7c98\u8d34\u5728\u6587\u4ef6\u4e2d\r\nca-bundle.crt \u00a0        (\u6839\u8bc1\u4e66\u94fe\uff09<\/pre>\n<p>2. \u5148\u6253\u5f00PHPStudy \u7684\u7ba1\u7406\u7a97\u53e3, \u70b9\u51fb<code>\u00a0\u5176\u4ed6\u9009\u9879<\/code>\u00a0,\u00a0<code>\u6253\u5f00\u914d\u7f6e\u6587\u4ef6<\/code>\u00a0, \u00a0<code>vhosts-conf<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-135\" src=\"https:\/\/www.ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823111338_79839.png\" width=\"594\" height=\"439\" alt=\"\" srcset=\"https:\/\/ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823111338_79839.png 594w, https:\/\/ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823111338_79839-300x222.png 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/p>\n<p><strong>3. \u4f8b\u5982\u5b89\u88c5 demo.getssl.cn \uff0c\u00a0<\/strong><strong>\u590d\u5236\u8be5\u7ad9\u70b9\u7684\u914d\u7f6e\u5185\u5bb9.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-136\" src=\"https:\/\/www.ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823112135_84565.png\" width=\"592\" height=\"491\" alt=\"\" srcset=\"https:\/\/ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823112135_84565.png 592w, https:\/\/ssle.cn\/help\/wp-content\/uploads\/2022\/01\/20170823112135_84565-300x249.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/p>\n<p><strong>4. \u5efa\u8bae\u5c06\u914d\u7f6e\u653e\u5728httpd.conf\u6587\u4ef6\u91cc\u9762\uff0c vhosts.conf \u6dfb\u52a0\u7ad9\u70b9\u914d\u7f6e\u6587\u4ef6\u4f1a\u91cd\u5199\uff0c\u5bfc\u81f4\u914d\u7f6e\u4e22\u5931\u3002<\/strong><\/p>\n<pre class=\"  language-apacheconf\"><code class=\"  language-apacheconf\"> <span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;<\/span>VirtualHost<span class=\"token directive-block-parameter attr-value\"> *<span class=\"token punctuation\">:<\/span>80<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>\r\n    <span class=\"token directive-inline property\">DocumentRoot<\/span> <span class=\"token string\">\"D:\\phpStudy\\WWW\"<\/span>\r\n    <span class=\"token directive-inline property\">ServerName<\/span> demo.getssl.cn\r\n    <span class=\"token directive-inline property\">ServerAlias<\/span> \r\n  <span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;<\/span>Directory<span class=\"token directive-block-parameter attr-value\"> \"D<span class=\"token punctuation\">:<\/span>\\phpStudy\\WWW\"<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>\r\n      <span class=\"token directive-inline property\">Options<\/span> FollowSymLinks ExecCGI\r\n      <span class=\"token directive-inline property\">AllowOverride<\/span> All\r\n      <span class=\"token directive-inline property\">Order<\/span> <span class=\"token directive-inline property\">allow<\/span>,deny\r\n      <span class=\"token directive-inline property\">Allow<\/span> from all\r\n      <span class=\"token directive-inline property\">Require<\/span> all granted\r\n  <span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;\/<\/span>Directory<span class=\"token punctuation\">&gt;<\/span><\/span>\r\n<span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;\/<\/span>VirtualHost<span class=\"token punctuation\">&gt;<\/span><\/span>\r\n\r\n<span class=\"token comment\" spellcheck=\"true\">#\u5efa\u8bae\u5c06\u4e0b\u9762SSL\u914d\u7f6e \u653e\u5728 httpd.conf\u6587\u4ef6\u4e2d<\/span>\r\n<span class=\"token directive-inline property\">Listen<\/span> 443\r\n<span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;<\/span>VirtualHost<span class=\"token directive-block-parameter attr-value\"> *<span class=\"token punctuation\">:<\/span>443<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>\r\n    <span class=\"token directive-inline property\">DocumentRoot<\/span> <span class=\"token string\">\"D:\\phpStudy\\WWW\"<\/span>\r\n    <span class=\"token directive-inline property\">ServerName<\/span> demo.ssle.cn\r\n    <span class=\"token directive-inline property\">ServerAlias<\/span> \r\n    <span class=\"token directive-inline property\">SSLEngine<\/span> on\r\n    <span class=\"token directive-inline property\">SSLProtocol<\/span> all -SSLv2 -SSLv3\r\n    <span class=\"token directive-inline property\">SSLCertificateFile<\/span> d:\/ssl\/yourdomain.com.crt \r\n    <span class=\"token directive-inline property\">SSLCertificateKeyFile<\/span> d:\/ssl\/yourdomain.com.key \r\n    <span class=\"token directive-inline property\">SSLCertificateChainFile<\/span> d:\/ssl\/ca-bundle.crt\r\n  <span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;<\/span>Directory<span class=\"token directive-block-parameter attr-value\"> \"D<span class=\"token punctuation\">:<\/span>\\phpStudy\\WWW\"<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>\r\n      <span class=\"token directive-inline property\">Options<\/span> FollowSymLinks ExecCGI\r\n      <span class=\"token directive-inline property\">AllowOverride<\/span> All\r\n      <span class=\"token directive-inline property\">Order<\/span> <span class=\"token directive-inline property\">allow<\/span>,deny\r\n      <span class=\"token directive-inline property\">Allow<\/span> from all\r\n      <span class=\"token directive-inline property\">Require<\/span> all granted\r\n  <span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;\/<\/span>Directory<span class=\"token punctuation\">&gt;<\/span><\/span>\r\n<span class=\"token directive-block tag\"><span class=\"token punctuation\">&lt;\/<\/span>VirtualHost<span class=\"token punctuation\">&gt;<\/span><\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.\u4e0b\u8f7dSSL\u8bc1\u4e66\u5e76\u4e0a\u4f20\u5230\u670d\u52a1\u5668 \u767b\u5f55\u4f1a\u5458\u4e2d\u5fc3\uff1ahttps:\/\/ssle.cn \u7ba1\u7406SSL\u8bc1\u4e66 -&gt; \u8ba2\u5355\u8be6\u7ec6 -&gt; \u4e0b\u8f7dSSL\u8bc1\u4e66 -&gt; \u9009\u62e9 [Apache] , \u70b9\u51fb[\u4e0b\u8f7dSSL\u8bc1\u4e66] yourdomain.com.crt \u00a0 \u00a0 (\u670d\u52a1\u5668\u8bc1\u4e66) yourdomain.c &hellip;<\/p>\n","protected":false},"author":1,"featured_media":135,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ssl-install"],"_links":{"self":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":0,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/media\/135"}],"wp:attachment":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}