我今天已经安装了SSL证书,并且它完美地工作,页面通过https://工作正常。Apache SSL配置休息HTTP
我已经在我的网站.conf中重定向到端口80重定向到https,但它不工作。
此外,如果我去http://www.example.org(根),它卡在重定向循环。 去http://www.example.org/test.htm去相同的网址减去最后一个/。例如http://www.example.orgtest.htm/(斜杠移动到尽头)
这真的是打破了我的球,我真的希望你们有一些线索。
这里是我的.conf文件
NameVirtualHost *:80
<VirtualHost *:80>
ServerName example.org
Redirect permanent/https://www.example.org
</VirtualHost>
<VirtualHost _default_:443>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName example.org
ServerAlias www.example.org
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.org
DocumentRoot /var/www/example.org/html
# SSL settings
SSLEngine on
SSLCertificateFile /etc/ssl/certs/www_example_org.crt
SSLCertificateKeyFile /etc/ssl/digicert/example.key
SSLCACertificateFile /etc/ssl/certs/DigiCertCA.crt
# Log file locations
LogLevel warn
ErrorLog /var/www/example.org/log/error.log
CustomLog /var/www/example.org/log/access.log combined
</VirtualHost>