我在apache2.0中配置了不同端口号的http和https,现在我需要添加名为headerssl的自定义标头,此标头必须说"hi it took D=345 microsecond to serve you."
它只能通过https网站访问。
答案 0 :(得分:0)
请参阅this mod_ssl guide设置启用SSL的站点,默认的Apache安装包括示例SSL站点以供参考。您可以将其作为起点并根据您的配置进行自定义。
请参阅this mod_headers guide配置自定义标头。对mod_headers使用以下语法,但将此行放在SSL配置中,请参阅下面的示例:
<VirtualHost *:443>
ServerName www.example.com
SSLEngine on
SSLCertificateFile "/path/to/www.example.com.cert"
SSLCertificateKeyFile "/path/to/www.example.com.key"
Header set headerssl "Hi it took D = %D microseconds to serve you"
</VirtualHost>