{"componentChunkName":"component---node-modules-arcblock-gatsby-theme-docs-src-templates-documentation-js","path":"/en/router/certificates-for-localhost","result":{"data":{"file":{"changeTime":"5 minutes ago","childMarkdownRemark":{"frontmatter":{"author":"zhenqiang","category":"","date":null,"description":"Certificates for localhost","draft":null,"keywords":"abtnode, router, certificates","language":"en","layout":"documentation","path":"/en/router/certificates-for-localhost","tags":["abtnode"],"title":"Certificates for localhost"},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To help you with your local development and testing, it is very easy to generate a local certificate. Outside of the machine you are currently developing on, the certificate will not be trusted by anyone else, which is sufficient for development."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"use-openssl-to-generate-localhost-certificate","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#use-openssl-to-generate-localhost-certificate","ariaLabel":"use openssl to generate localhost certificate permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Use OpenSSL to generate localhost certificate"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To start we wil use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"openssl"}]},{"type":"text","value":" to generate the certificate. Use the following command:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"],"req":"","-x509":"","-out":"","localhost.crt":"","-keyout":"","localhost.key":"","\\":""},"children":[{"type":"text","value":"openssl req -x509 -out localhost.crt -keyout localhost.key \\\n  -newkey rsa:2048 -nodes -sha256 \\\n  -subj'/CN=localhost' -extensions EXT -config <( \\\n   printf \"[dn]\\nCN=localhost\\n[req]\\ndistinguished_name = dn\\n[EXT]\\nsubjectAltName=DNS:localhost\\nkeyUsage=digitalSignature\\nextendedKeyUsage=serverAuth\")\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"test-certificate","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#test-certificate","ariaLabel":"test certificate permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Test Certificate"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After the certificate is generated, we can test it with ABT Node's NGINX using the configuration below:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Replace <your directory> with the real directory"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-nginx"],"auto;":""},"children":[{"type":"text","value":"worker_processes auto;\n\nevents {}\n\nhttp {\n    server {\n        listen 443 ssl;\n        server_name localhost;\n\n        ssl_certificate <your directory>/localhost.crt;\n        ssl_certificate_key <your directory>/localhost.key;\n\n        root <your directory>/localhost-certificates;\n\n        location / {\n          index index.html;\n        }\n    }\n}\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then enter "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"https://localhost"}]},{"type":"text","value":" in the browser:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 835px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 72%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAABjklEQVQ4y61Sy07CUBDlK1SIiSgkkMCiwYUJiT8jRdfSVhJXhLhz6c5/8B80caFf4EoTN/JqC/QBfR+nt2AKKVITb3Iyk8ncM2fOvRmufIRipYha7QT1+ik47hilcgXVKodCsYTdvRx2drMbkT8s4CBfQDa3z2JGFNuQCIIgQRSv0BJEXLYESFIbzeYFGnwTPH+eiLMGj06ni273ht0PkcE/n4zn+3AtC5PnRzizGVzPg+u6K/ColhZMoaeMMLy7ha8qiVODINiKZR8jtGwbqqZDlmUMBgOoqgpZUdDr9aFpWqpVl8SMcD630O/3iWzISMIYEo5GMhRFxYysmBKxOh7DMEzohgFd1yk3WG6Y5qpC23YwInUyXV6qNM0ZfGrwyWMv5muUe7E8iiuE4SWb1g7hOC7BwZweKqynPT8rLw3d1vinR0nTuD6AbUbR8yOw2iaFcaKkAetD4rWFhwGchelJqpIsCM/bl4OXdxuvHzb0eeR39LHplcbjCf05/Vd160rvnwxcP0wZPpXopb8BK1z38G5RddMAAAAASUVORK5CYII='); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"test failed","title":"test failed","src":"/abtnode/static/bdd08c103b766206dae38183a1527a85/e6414/test-failed.png","srcSet":["/abtnode/static/bdd08c103b766206dae38183a1527a85/41b2e/test-failed.png 250w","/abtnode/static/bdd08c103b766206dae38183a1527a85/36a81/test-failed.png 500w","/abtnode/static/bdd08c103b766206dae38183a1527a85/e6414/test-failed.png 835w"],"sizes":["(max-width:","835px)","100vw,","835px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the image, we can see that there is a problem with the certificate (In Safari users you will see 'Safari Can't Open the Page'), because the certificate is not yet trusted by the system at this time.  So, then ext step is to tell the system to trust the certificate."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"trust-certificate-mac-os","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#trust-certificate-mac-os","ariaLabel":"trust certificate mac os permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Trust Certificate (Mac OS)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After the certificate is generated, it cannot be used directly; you need to "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"trust"}]},{"type":"text","value":" the newly generated certificate on your device. For this example Let's use Mac OS."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The generated certificate is in the current directory, double-click the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"localhost.crt"}]},{"type":"text","value":" file in the file manager (Finder):"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 770px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 56.8%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABcUlEQVQoz63SYU/aUBTG8X7/b7OWQRWBjhYobW9RRsIcAlGkMGC0HVJtq/vvQqIjJmZh+uKXk5wXzz3n5CqTYY/+qM/VYMD4qo/TMpndjllMR9xORozGA4Lr79KA62Gf5eyGcDlls56/iH/O+LX+wWo+QWm2PVxXIPxzPtW6lBrfsHpzdC+g6Ew5ETN0Md8rNIdo5iXVTsBpZ0HRDdDsG2rdBSfuhPpFgFKpGVSNOqbVotpdUeuFqHaAKmK0iwT1/A5N2tWiH1LyV/uqdu5eFPyIglhT+RqhGFaTL2YDq9EkTWIgh9+prNk/5Af+9pXWqU65fIYnOqzDiDTLuX9I95JX7g+81VeEfUZJ12k7HlEUkec5aZrK4Ox4qZzwc8NAK+kI4RPuAh/fESgpVUNQrhh4nviYQMMwUQtFnIOVH3aB/yXb/UMHo25h2w5xHPP49EQmX8pk8FGeJ2zLVV15P8/zWS5XbLdbNpvN0ZIk2Qf+ATFKNHPrr3VMAAAAAElFTkSuQmCC'); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"cert-list","title":"cert-list","src":"/abtnode/static/24ea1f6061b10f941ed73454204c766f/e926f/cert-list.png","srcSet":["/abtnode/static/24ea1f6061b10f941ed73454204c766f/41b2e/cert-list.png 250w","/abtnode/static/24ea1f6061b10f941ed73454204c766f/36a81/cert-list.png 500w","/abtnode/static/24ea1f6061b10f941ed73454204c766f/e926f/cert-list.png 770w"],"sizes":["(max-width:","770px)","100vw,","770px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After double-clicking, the setting page of "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Keychains Access"}]},{"type":"text","value":" will appear, then double-click the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" certificate:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 877px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 63.2%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAABbklEQVQ4y6WS20rDQBCG9/3fQNELURSkz2CVQsHDVaHSNuk5zblJts359LsZ29hK9aIJfOzMZPZn2PlZf9DDaCRhMpliMZegKUOMxzIkWYau64RpmjWGYdSnbdtwXRee5xFVzj77fUiSBFXVYK1GsJbvUJZTTGdzONTMEcUxoig6Iha1NE1rkt3J5GGfLhVlgWRjw1M+EPsG/A0Hdyz43EXocyLYcqRxKAgA5Dj1Mc9dIwgCSlaGC8UKsLRCzAwfczPAXJwzfUv5WHGwNH0sRF1W1ljoHKotevQNBjOTetmh+ktPxWPXwE3HxcXTGpftPQ7ltx0bD93v+E7ErVcHrTcP96J23TZx9eyAFUWBsiwJoBBk/5D/Ef/kRxPGSSoWkBDhCQ7/Rb/Y9zDOOa2+2lq1zSRJGsEqz1W+yrKMRJOdBc6FqepCCFr0hiTadMKRMLWmaeT0MAxrk549YTVVJZLneeP3owkPt0zigqwBX7t25QwBwcq7AAAAAElFTkSuQmCC'); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"keychains-localhost","title":"keychains-localhost","src":"/abtnode/static/d36cb0561d07805334ba1e4357269b93/fbb82/keychains-localhost.png","srcSet":["/abtnode/static/d36cb0561d07805334ba1e4357269b93/41b2e/keychains-localhost.png 250w","/abtnode/static/d36cb0561d07805334ba1e4357269b93/36a81/keychains-localhost.png 500w","/abtnode/static/d36cb0561d07805334ba1e4357269b93/fbb82/keychains-localhost.png 877w"],"sizes":["(max-width:","877px)","100vw,","877px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After double-clicking the certificate, in the settings of "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Trust"}]},{"type":"text","value":", set "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"When using this certificate"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Always Trust"}]},{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 513px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 84.39999999999999%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAAAsTAAALEwEAmpwYAAACFklEQVQ4y41U2Y7aQBD0/39JpLyslMfkJS+rJMvCogSEOXyCMTY2YPABPipUL0aAIVlLrZ4Z2jVV3WUU/+UZb6NveNX7cKwZbNuCZVnQdR2GYWAymaDVaqHdbsua55qmSb4NnivxaoCN/wdZpGHumBgMVDiOg6IokOe55Kqq8JEnDEIogf4LU0OFZ3+HY6rQDTI0MZ/PMZ1OMZvNkCQJdrsd4jiWvN1uJdfnjP1+jzAkoPEbjvoMT/uKKHSxXC7h+76wXCwWAux5nqwZsnYdqSPwer3GZrNBmqYIggBKfpTEojjeC23Ku5V4u99mQF402yAMcSpOkhir1eoqeDvlkBkZUTJ7+mNSItwkx5vKKwLvgCcGfIEHpE0wrmsQ7ikrO8oi4KtRIsvRUMQ6hZuyLOVFDoCjH4/HGA6H6Pf7Akr72LYtjA+HAz6/5NimAncFyMEoBGMP66mORiPxlGma4jsypS85pCiKwJ5/eSuwy5qAvEwkX3qO/aoNzUxAgvMyymbdU7uQwdwFvGda13XPzqdktoIKaJP/At5ag0Op2RGUgOzfWfIR8NPPAlH6AJA9pFRmPpRFmZeGZSZYlmVSq/klDsWJyIUyAWQRb6dMTpp7snj0vLOpuDizq+Oqh/zcer0eVFWVqdZM6z+HyyjLJlhjKNyQIRtPmdzTV/Xv1R1G/wQkm263i06nI8ZmDzmgewwfBQn8BU6EGDGvXi1lAAAAAElFTkSuQmCC'); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"keychains-localhost-trust","title":"keychains-localhost-trust","src":"/abtnode/static/464531a5394094ef7dc18d8f64d7cb65/fb73d/keychains-localhost-trust.png","srcSet":["/abtnode/static/464531a5394094ef7dc18d8f64d7cb65/41b2e/keychains-localhost-trust.png 250w","/abtnode/static/464531a5394094ef7dc18d8f64d7cb65/36a81/keychains-localhost-trust.png 500w","/abtnode/static/464531a5394094ef7dc18d8f64d7cb65/fb73d/keychains-localhost-trust.png 513w"],"sizes":["(max-width:","513px)","100vw,","513px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then click the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Close"}]},{"type":"text","value":" button in the upper left corner, before the window is closed, the system will prompt to save the settings, enter the password to save the settings:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 563px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 87.6%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAACh0lEQVQ4y5VUa2/aQBD0//8R/QmV8i0KCU1IgKbBBSIw4BfY2IDNww0QHhEwvVl6lLRSlVoa7fl8Nzc7u2ejZXkIni5RdS/h9T1EYYQgCBDHMYbDIQaDASzLQqPRQL/fl/koiiRqcE0YhjI2HMfBMrPxI3GwzlwEYQzf97BarbDb7bDdbvGR5+3tTQ42WlYTE+8ZsV9G4l8rwgie58J1XRU9dDodUTAajZAkiYDv4/EY0+lU4mw2w3w+V0J8Rdh2kSUB+o6JxSzGdrPC6+srlsulRD1eLBaySUedAXE4HLDZbNBut2G02x30ghAd20PYP/qjPdLjPz3jO32mbyTWKZumCUOMT0cYpYl4R09t25ZUCZ56PtdsNtHtdqVgJJ5MJkK4Xq/hKJuMVHmzuLhDVmniuWWh+PCA+/t7FItF8ZGEjCRkJCmJsiwTP+ktU2bqnDfSwRDh5xzM6zuEcYRWqyWbCaZFoxmpqtfriSIWg5FkxH6/F5VUbYzVh2Q6wTAZYaYWcjGrpjexirrC+luq7OG3NE1PhFQphJxIk/T0kZEgASObmSrZQtxAIhaRBTlXeCLMfymgVqsJqtUqHh8fkcvlBFdXVygUCri9vRWUyyWUv37DpwsT36s18ZNekuxEWDHrSNQp9IiKqIDmUoG+TlRJSOrpGA1vrKyYYP7yIu3yjtB2e3K9tF8vahGhjf77OQg0yTmEsGP7p6Wsou43FoCK2V/SFuqA/S/sdr/H5zgqdLonQvYSrxUVkuR/H1piWOou0yf2WqlUQj6fx83NDer1Op4qFWls+uupSvv/gL6Khtc9tgXT1H8YvvO66f/gR8CDaZExTGaS6tGb3TuwWBuF7UehKv4TBc44UBwGe9oAAAAASUVORK5CYII='); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"password","title":"password","src":"/abtnode/static/b1a95b17d369c8f1a976d41e0c513789/e80e2/password.png","srcSet":["/abtnode/static/b1a95b17d369c8f1a976d41e0c513789/41b2e/password.png 250w","/abtnode/static/b1a95b17d369c8f1a976d41e0c513789/36a81/password.png 500w","/abtnode/static/b1a95b17d369c8f1a976d41e0c513789/e80e2/password.png 563w"],"sizes":["(max-width:","563px)","100vw,","563px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now revisit "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"https://localhost"}]},{"type":"text","value":" in the browser. We can now see that the test website can be accessed normally:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 835px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 72%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAt0lEQVQ4y+2TywqCQBiF5ynyUpA1EC6EaiWI4cM0DiGmiLQX6aEzLyfHmJBqEdom6MDHYRbzcTY/2ZoU5tqE43hwXa/tHWzbgWVtsKQrKOoUE0V7QVH1DmNBMTcoNH3WNYmiBIIgCBEeI8RxAsY4mM/v/YY988H5AX5LluXI8zPS9NRBmqZBURQoy2vbF4wNqesaQioR76qqBkP6MomI7E/S/0OGCP7CXxaO4SEcu+555VcXiiu7AWO8BEVN2nvaAAAAAElFTkSuQmCC'); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"alt":"test-success","title":"test-success","src":"/abtnode/static/6ea1f0e14e256d48d59f4b155d12d204/e6414/test-success.png","srcSet":["/abtnode/static/6ea1f0e14e256d48d59f4b155d12d204/41b2e/test-success.png 250w","/abtnode/static/6ea1f0e14e256d48d59f4b155d12d204/36a81/test-success.png 500w","/abtnode/static/6ea1f0e14e256d48d59f4b155d12d204/e6414/test-success.png 835w"],"sizes":["(max-width:","835px)","100vw,","835px"],"style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;","loading":"lazy"},"children":[]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Complete the settings."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"ssl-certificates","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#ssl-certificates","ariaLabel":"ssl certificates permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"SSL Certificates"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can add SSL Certificate files to your ABT Node using your SSL Certificate File and Private Key Files to secure services on your node. Today, ABT Node supports single domain SSLs and Wilcard SSLs to protect a domain (arcblock.io) and all its related subdomains (test.arcblock.io, shop.arcblock.io, etc). ABT Node does not support partial or multi-domain wildcard SSLs at this time. Please confirm with your SSL provider on the best SSL type for your project and not all types of certificates are supported. Developers can also leverage Letsencrypt self-signed "},{"type":"element","tagName":"a","properties":{"href":"./certificates-for-localhost"},"children":[{"type":"text","value":"Certificates for localhost"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"reference","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#reference","ariaLabel":"reference permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Reference"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"-[Let's Encrypt] localhost certificate: "},{"type":"element","tagName":"a","properties":{"href":"https://letsencrypt.org/docs/certificates-for-localhost/"},"children":[{"type":"text","value":"https://letsencrypt.org/docs/certificates-for-localhost/"}]}]}],"data":{"quirksMode":false}}}}},"pageContext":{"site":{"title":"ABT Node","description":"ABT Node Documentation","siteUrl":"https://docs.arcblock.io","logoUrl":"/abtnode/","sidebarWidth":360,"disableI18n":false,"showGetStarted":true,"defaultBanner":"/abtnode/og-banner.png"},"id":"a58f86ae-86ab-5094-b0fe-83142ee83083","language":"en","locale":"en","languages":[{"value":"en","text":"English"},{"value":"zh","text":"简体中文"}],"headings":[{"value":"Use OpenSSL to generate localhost certificate","depth":2},{"value":"Test Certificate","depth":2},{"value":"Trust Certificate (Mac OS)","depth":2},{"value":"SSL Certificates","depth":2},{"value":"Reference","depth":2}],"navItems":[{"group":"/home/runner/work/abtnode-docs/abtnode-docs/src","title":"ABT Node","priority":999,"link":"/"}],"version":"v0.2.20","official":true,"originalPath":"/en/router/certificates-for-localhost","sidebarContent":[{"url":null,"title":null,"pages":[{"title":"ABT Node Docs","path":"/en/"}]},{"url":"/en/introduction","title":"Introduction","pages":[{"title":"ABT Node Overview","path":"/en/introduction/abtnode-overview"},{"title":"ABT Node Setup","path":"/en/introduction/abtnode-setup"},{"title":"ABT Node Access","path":"/en/introduction/abtnode-access"}]},{"url":"/en/marketplace","title":"Marketplace","pages":[{"title":"Find and Install Blocklets","path":"/en/marketplace/find-and-install"},{"title":"Upgrade/downgrade blocklet","path":"/en/marketplace/upgrade-downgrade"}]},{"url":"/en/blocklet","title":"Blocklets","pages":[{"title":"Basic Operations","path":"/en/blocklet/basic-operations"},{"title":"Blocklet Environments","path":"/en/blocklet/environments"},{"title":"Core Blocklets","path":"/en/blocklet/core-blocklets"}]},{"url":"/en/router","title":"Service Gateway","pages":[{"title":"What is Service Gateway?","path":"/en/router/what-is-router"},{"title":"Service Gateway Usage","path":"/en/router/basic-usage"},{"title":"Binding domain names to sites and enabling SSL","path":"/en/router/bind-domain-and-ssl"},{"title":"Certificates for localhost","path":"/en/router/certificates-for-localhost"}]},{"url":"/en/deployment","title":"Deployment","pages":[{"title":"Production Best Practice","path":"/en/deployment/best-practice"},{"title":"Deploy ABT Node Using AWS AMI","path":"/en/deployment/from-aws-ami"},{"title":"Bind domain with reverse proxy server","path":"/en/deployment/behind-reverse-proxy"},{"title":"Run In Docker","path":"/en/deployment/run-in-docker"}]},{"url":"/en/misc","title":"Misc","pages":[{"title":"Node Settings","path":"/en/misc/node-settings"},{"title":"Member Management","path":"/en/misc/member-management"},{"title":"GraphQL Console","path":"/en/misc/graphql-console"}]},{"url":"/en/developer","title":"Developer Guide","pages":[{"title":"Configuring the development environment","path":"/en/developer/config-dev-env"},{"title":"ABT Node CLI","path":"/en/developer/abtnode-cli"},{"title":"Node Configuration","path":"/en/developer/configuration"},{"title":"Storage Structure","path":"/en/developer/storage-structure"},{"title":"Blocklet Specification","path":"/en/developer/blocklet-spec"},{"title":"Create Static Blocklets","path":"/en/developer/static-blocklets"},{"title":"Create DApp Blocklets","path":"/en/developer/dapp-blocklets"},{"title":"Blocklet Hooks","path":"/en/developer/blocklet-hooks"},{"title":"Bundle Blocklets","path":"/en/developer/bundle-blocklets"},{"title":"Publish Blocklets","path":"/en/developer/publish-blocklets"},{"title":"Blocklet Registry","path":"/en/developer/blocklet-registry"},{"title":"Developing Blocklets with Codespaces","path":"/en/developer/blocklet-codespaces"},{"title":"Configure Auth Service for Blocklet","path":"/en/developer/auth-service"},{"title":"Composable blocklet","path":"/en/developer/composable-blocklet"},{"title":"Docker Registry List","path":"/en/developer/docker-registry"}]}],"communityPath":"https://community.arcblockio.cn","githubUrl":"https://github.com/ArcBlock/abtnode-docs/tree/master/src/router/certificates-for-localhost/index.md"}},"staticQueryHashes":["1358860651","1619896071","1812186216","2194038815"]}