【发布时间】:2020-03-07 07:26:31
【问题描述】:
我有一个 Apache 2.4 站点,它提供由 modperl 通过 HTTPS 生成的内容。相关Location部分如下:
<Location />
SetHandler modperl
PerlResponseHandler MyService
</Location>
我现在也想通过 HTTP 启用相同的内容。下面的/etc/apache2/sites-enabled/myservice.conf 在某种程度上起作用,因为它重定向带有尾随路径的 URL,而不是“根”页面(例如,http://myservice.mycompany.com)。我怀疑这是(也)因为此页面的特殊之处在于它由modperl 支持。
<VirtualHost *:80>
LogLevel debug
ServerName myservice.mycompany.com
RedirectPermanent / https://myservice.mycompany.com
</VirtualHost>
那么我如何使用RedirectPermanent 将整个Apache 站点从HTTP 重定向到HTTPS,包括那些由modperl 支持的页面?
【问题讨论】: