我正在尝试将保持活动的连接closures的请求,以在Apache中的子文件夹,但是当我重新加载configuration我得到以下错误:
KeepAlive not allowed here
这是我的虚拟主机configuration:
<VirtualHost *:80> ServerAdmin [email protected] ServerName example.com DocumentRoot /srv/www/mysite DirectoryIndex index.html <Location /subfolder> KeepAlive Off </Location> </VirtualHost>
我也试过使用<Directory> ,但是也没有去那里。
有任何想法吗? 我宁愿不把整个网站的保持活跃状态…
请参阅文档中允许的上下文。 KeepAlive 只允许在主服务器块中或直接在<VirtualHost>块中 – 而不是在Directory环境中(这就是<Location>所代表的内容)。
我敢问你为什么要closuresKeepAlive ? 这是一件好事 – 如果可能的话,请继续使用。