Apache: Perl Upload progress madness
First, install and activate apache2’s perl module:
# apt-get install libapache2-mod-perl2
# a2enmod perl
Now use perl CPAN to install further perl libraries:
# cpan
cpan> install Cache::FastMmap
cpan> install Apache::Test
-> /usr/sbin/apache2
-> ENTER
cpan> install Apache2::UploadProgress
cpan> quit
Edit the corresponding apache2 vhost configuration file you wish to use the upload progress logic in:
/etc/apache2/sites-enabled/xxx/example.com.conf
# Apache2-UploadProgress perl implementation
PerlLoadModule Apache2::UploadProgress
PerlPostReadRequestHandler Apache2::UploadProgress
UploadProgressBaseURI /UploadProgress
Alias /UploadProgress /home/xxx/example.com/shop/UploadProgress
This enables the client to query the uri /UploadProgress to gain the progress of a clients upload. Your mileage may vary, this is rather old and was for a legacy customers website.
I do not use such server-side hacks anymore but rely on modern browsers and client-side code…