我正在尝试通过XAMPP上的HTTPS运行项目。 我试图在xampp / apache / conf / extra / httpd-vhost.conf中配置SSL,如下所示:
<VirtualHost *:443>
DocumentRoot C:/xampp/htdocs/yourProject
ServerName yourProject.whatever
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
</VirtualHost>
答案 0 :(得分:0)
尝试
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]