我在 AWS Windows 10 机器上部署了一个网站。我安装了 XAMPP 并将域转发到机器 IP。所以网站 http://endeleaplan.com/ 部署在本地 XAMPP 服务器上。问题是安装 SSL 证书,我从 https://zerossl.com 获得了一个免费的 SSL 证书并遵循了所有程序。
1:我在目录 xampp/apache/conf/ssl.crt 和 xampp/apache/conf/ 上添加了证书(server.crt、ca_bundle.crt 和 server.key) ssl.key
2:我配置了xampp/apache/conf/extra
中的主机文件httpd-vhosts.conf<VirtualHost endeleaplan.com:80>
DocumentRoot C:/xampp/htdocs
ServerAdmin admin@endeleaplan.com
ServerName endeleaplan.com
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
SSLCertificateChainFile "conf/ssl.crt/ca_bundle.crt"
和
<VirtualHost endeleaplan.com:443>
DocumentRoot C:/xampp/htdocs
ServerAdmin admin@endeleaplan.com
ServerName endeleaplan.com
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
SSLCertificateChainFile "conf/ssl.crt/ca_bundle.crt"
注意:我什至尝试添加完整位置,例如:C:/xampp/apache/conf/ssl.crt/server.crt 和
3:我在 C:\Windows\System32\drivers\etc\hosts 上配置了虚拟主机
172.26.**.**4 endeleaplan.com
当我重新启动服务器并尝试访问网站时,我收到错误证书无效或网站没有响应。
我的网站使用的是基本的.HTACCESS
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
任何对我如何解决这个问题有想法的人,我已经尝试了一个星期了。我的Certificates