Apache::Queue

联合创作 · 2023-10-01 16:00

Apache::Queue 是一个Apache的模块用来做HTTP的文件下载队列,当下载的人数超过预设的数字,这多出来的请求将被放入队列等待处理,而不是出错。

安装方法:

perl Makefile.PL
make
make install

配置示例:

#httpd.conf

SetHandler perl-script
PerlHandler Apache::Queue

# the size of the queue (default: 300)
PerlSetVar QueueSize 300

# how many simultanious file transfers
# before queueing (default: 10)
PerlSetVar MaxSends 10

# Location of queue files (default: /tmp)
# This path must be writable by the Apache
# process
PerlSetVar QueuePath /tmp

# Location of customized templates if needed
# Do not set this if you wish to use the internal templates
# Templates are process by Template-Toolkit, see
# http://www.template-toolkit.org for docs
#
# There are 4 template files needed.
# queue_send.html - The "Your download should start..." page
# queue_sending.html - Notifys the visitor of an existing download
# queue_position.html - Page used while a user is inline
# queue_full.html - Tells the queue is full
#
# View the defaults in the module for samples
PerlSetVar Te
浏览 4
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报