如何在xampp上运行https。我正在创建一个网站,但是如果使用https://调用则不起作用。 我试试
DocumentRoot C:/xampp/htdocs/yourProject
ServerName yourProject.whatever
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
和
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
非常感谢你。
答案 0 :(得分:0)
确保您的服务器正在侦听端口443.示例:
<VirtualHost *:443>
ServerName www.foo.com
DocumentRoot /var/www/www.foo.com/htdocs
CustomLog /var/log/apache/www.foo.com-access.log combined
ErrorLog /var/log/apache/www.foo.com-error.log
# Example SSL configuration
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/var/www/www.foo.com/ssl/server.crt"
SSLCertificateKeyFile "/var/www/www.foo.com/ssl/server.key"
</VirtualHost>