我正在尝试设置一个自签名 SSL 证书,以便我可以使用 SSL 开发我的应用程序(这样我最终可以让我的网站使用 SSL 运行......)。我创建了一个带有无头 API (Lumen) 的 Angular 站点,并尝试使用 ServerFault 中的一个问题来设置多域 SSL 证书:
测试命令已检出,因此我尝试使用以下 Apache 配置安装证书:
<VirtualHost *:80>
ServerAdmin contact@gamersplane.com
ServerName api.gamersplane.local
DocumentRoot /var/www/GamersPlane.api/public
<Directory /var/www/GamersPlane.api/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "|/usr/bin/cronolog /var/log/gamersplane/%Y/%m/%d/error.log"
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel notice
CustomLog ${APACHE_LOG_DIR}/gamersplane/access.log combined
SSLEngine on
SSLCertificateFile /var/www/GamersPlane.api/ssl/gamersplane.local.pem
SSLCertificateKeyFile /var/www/GamersPlane.api/ssl/gamersplane.local.key
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
不幸的是,当我点击我的网站时,我得到This site can’t provide a secure connection. 我尝试为此使用谷歌搜索,但一切似乎都特定于某些站点/配置,我无法弄清楚如何调试出了什么问题。
我通过 Digital Ocean …