我使用Apache的httpd <Directory>
公开文件,如下所示
Alias /getfiles "/web/playbooks/tmpfiles"
<Directory "/web/playbooks/tmpfiles">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>
有了这个,我就可以通过下面的Web浏览器URL访问/web/playbooks/tmpfiles
中的所有文件/文件夹。
http://<server>:<port>/getfiles/<anyfile.txt>
是否可以刷新上述URL,以便我可以定期查看/web/playbooks/tmpfiles
内文件/文件夹的最新更改?
任何解决办法都很好。
1条答案
按热度按时间f2uvfpb91#
你可以尝试通过html本身的指令让客户端自动刷新,而不是尝试做一些奇怪的事情,这可能不在http规范中(我可能错了)。
例如,根据您的目录条目,load module_autoindex module然后使用以下配置:
这样一来,Apache httpd就会在html中添加该标记,客户端就会知道它必须每10秒自动刷新一次页面。一般来说,不建议将此值设置得太低,所以10秒或更高可能对您来说是合适的。