我今天已經安裝了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>