In this guide, you will learn how to set up a self-signed SSL certificate for use with an Apache web server on an Ubuntu 16.04 server. Note:A self-signed certificate will encrypt communication between your server and any clients. However, because it is not signed by any o...
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile/etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile/etc/ssl/private/apache-selfsigned.key <FilesMatch"\.(cgi|shtml|phtml|php)$">SSLOptions+StdEnvVars</Files...
代码语言:txt 复制 ## /etc/apache2/sites-available/example.com.conf <VirtualHost \\\*:443> SSLEngine On SSLCertificateFile /etc/ssl/certs/example.com.crt SSLCertificateKeyFile /etc/ssl/private/example.com.key SSLCACertificateFile /etc/ssl/certs/ca-certificates.crt #If using a self-signed cer...
SSLCertificateKeyFile/etc/ssl/private/example.com.key</VirtualHost> 最后,使能https并且重启Apache服务。 sudo a2ensite example.com-ssl.conf sudo systemctl reload apache2 参考文档: 1https://www.configserverfirewall.com/hosting/openssl-ubuntu-self-signed-certificate/...
4. 5. 6. 7. 8. 9. 10. 最后,使能https并且重启Apache服务。 sudo a2ensite example.com-ssl.conf sudo systemctl reload apache2 1. 2. 参考文档: 1https://www.configserverfirewall.com/hosting/openssl-ubuntu-self-signed-certificate/
除了这种方式外,在Debian或者Ubuntu系统中有更加简便的方法制作self-signed证书使用make-ssl-cert命令。该命令在ssl-cert的包里,一般会伴随着Apache的安装而安装,可能单独安装也可以。 如果您只是想做一张测试用的电子证书或不想花钱去找个 CA 签署,您可以造一张自签 (Self-signed) 的电子证书。当然这类电子证书没...
SSLCertificateKeyFile cert/xxxxxxx.key # 证书链配置,如果该属性开头有 '#'字符,请删除掉 SSLCertificateChainFile cert/chain.pem ( 4 ) 重启 Apache。( 5 ) 通过 https ⽅式访问您的站点,测试站点证书的安装配置,如遇到证书不信任问题,请查看帮助视频。然⽽这只能参考。在Ubuntu下⾯,我是⽤apt...
-x509: This option specifies that we want to make a self-signed certificate file instead of generating a certificate request. -nodes: This option tells OpenSSL that we do not wish to secure our key file with a passphrase. Having a password protected key file would get in the way of Apac...
sudo service apache2 restart Step Three—Create a Self Signed SSL Certificate When we request a new certificate, we can specify how long the certificate should remain valid by changing the 365 to the number of days we prefer. As it stands this certificate will expire after...
apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt,`,,4. 配置Apache2以使用SSL证书:,编辑/etc/apache2/sites-available/default-ssl.conf文件,确保以下设置已更改:,`,SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt,SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key,`,...