Ubuntu 缺少到HTTPS的重定向
我用Let's encrypt在我的LAMP上安装SSL证书。我想通过HTTPS重定向我的所有域。 现在它可以工作了,但还不能完全工作 重定向到(证书工作)Ubuntu 缺少到HTTPS的重定向,ubuntu,ssl,apache2,Ubuntu,Ssl,Apache2,我用Let's encrypt在我的LAMP上安装SSL证书。我想通过HTTPS重定向我的所有域。 现在它可以工作了,但还不能完全工作 重定向到(证书工作) 不要重定向到https://,而是直接(证书有效) 这是我的.htaccess文件 RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L] 我修复了这个线程的问题 我在/etc/apache
不要重定向到https://,而是直接(证书有效) 这是我的.htaccess文件
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
我修复了这个线程的问题 我在/etc/apache2/apache2.conf中设置了
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
选项如下符号链接
允许超越所有
要求全部拒绝
允许超越所有
要求所有授权
选项索引跟随符号链接
允许超越所有
要求所有授权
All允许从“无”转换为“全部”,并重新启动Apache2服务