修改/etc/httpd/conf/httpd.conf
<Directory />
Options FollowSymLinks
AllowOverride All
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</Directory>
修改/etc/httpd/conf/httpd.conf
<Directory />
Options FollowSymLinks
AllowOverride All
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</Directory>