早上好
我有以下问题,我不知道如何解决。
我在Linux机器上安装了由Bitnami制作的Wordpress。我遇到的问题是我不知道如何使用SSL将https域重定向到另一个https域。详细信息:
在Apache级别,我已经进行了配置,以便可以重定向以下请求:
http://www. xxx .es -> https://www. xxx .com
http://www. xxx .net -> https://www. xxx .com
http://www. xxx .com -> https://www. xxx. com
我无法配置的是,我重定向了以下请求:
https://www. xxx .es -> https://www. xxx .com
https://www. xxx .net -> https://www. xxx .com
这是我的虚拟主机配置:
# Default Virtual Host configuration.
<IfVersion < 2.3 >
NameVirtualHost *:80
NameVirtualHost *:443
</IfVersion>
<VirtualHost _default_:80>
DocumentRoot "/opt/lampstack-7.1.14-0/apache2/htdocs"
RewriteEngine On
RewriteCond %{HTTP_HOST} !^xxx .com$
RewriteRule ^ https://www. xxx .com%{REQUEST_URI} [R=301,NE,L]
<Directory "/opt/lampstack-7.1.14-0/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/opt/lampstack-7.1.14-0/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
# Default SSL Virtual Host configuration.
<IfModule !ssl_module>
LoadModule ssl_module modules/mod_ssl.so
</IfModule>
Listen 443
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !EDH !RC4"
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/opt/lampstack-7.1.14-0/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost _default_:443>
DocumentRoot "/opt/lampstack-7.1.14-0/apache2/htdocs"
SSLEngine on
SSLCertificateFile "/opt/lampstack-7.1.14-0/apache2/conf/www.opein.com_2019.crt"
SSLCertificateKeyFile "/opt/lampstack-7.1.14-0/apache2/conf/www.opein.com_2019.key"
SSLCertificateChainFile "/opt/lampstack-7.1.14-0/apache2/conf/www.opein.com_2019.ca"
<Directory "/opt/lampstack-7.1.14-0/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/opt/lampstack-7.1.14-0/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
# Bitnami applications that uses virtual host configuration
Include "/opt/lampstack-7.1.14-0/apache2/conf/bitnami/bitnami-apps-vhosts.conf"