我正在尝试在这样的Windows机器上配置Apache 2.4:
SSLSessionCache shmcb:logs/ssl_session_cache(512000)
加载相关模块:
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
我在启动时没有出现任何错误,但似乎没有使用缓存。该文件未出现在日志目录中,而/ server-status告诉我:
SSL/TLS Session Cache Status:
cache type: SHMCB, shared memory: 524288 bytes, current entries: 0
subcaches: 32, indexes per subcache: 91
index usage: 0%, cache usage: 0%
total entries stored since starting: 0
total entries replaced since starting: 0
total entries expired since starting: 0
total (pre-expiry) entries scrolled out of the cache: 0
total retrieves since starting: 0 hit, 0 miss
total removes since starting: 0 hit, 0 miss
当我在浏览器中检查个别请求时,似乎还没有使用缓存。我是否必须以某种方式激活缓存?也许在虚拟主机配置或类似的东西?
更新:我的虚拟主机配置
SSLEngine on SSLCertificateFile“c:\ apache24 \ conf \ example.com.crt” SSLCertificateKeyFile“c:\ apache24 \ conf \ example.com.key” SSLCertificateChainFile“c:\ apache24 \ conf \ ca-bundle-client.crt”
ServerName example.com:443
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>
<Proxy balancer://mycluster>
BalancerMember http://localhost:9000
# Second Member is only standby
BalancerMember http://localhost:9001 status=+H
ProxySet lbmethod=byrequests
</Proxy>
<Proxy *>
Order Allow,Deny
Allow From All
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
ProxyPassReverse / http://localhost:9000/
ProxyPassReverse / http://localhost:9001/
# forwarding www- and .net/.de-versions of the domain as well as the ip address to example.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.example\.com|(www\.)?example\.(net|de)) [NC]
RewriteRule ^(.*)$ https://example.com$1 [L,NE,R=301]
端口上的虚拟主机:80只是重定向到上面的那个。