README of upload script
==== Install ====
upload is a cgi script.
Install it into a cgi-bin/ directory.
==== Configuration ====
Edit the upload script.
At the beginning of the file upload,
change variables $dir_prefix and $url_prefix to your need.
$dir_prefix is where the files are upload on the server disk.
$dir_prefix must be writable by the apache user (www-data or nobody or
ask your admin (yourself)).
Example (debian):
my $dir_prefix = "/var/www/depot/";
$url_prefix is where the files will be downloaded, as an url point of view.
Example (debian) if you have :
DocumentRoot /var/www/
or
Alias depot /var/www/depot
then use the value
my $url_prefix = "depot";
A file hello.txt will be uploaded to
/var/www/depot/????_??_??/XXXXXX/hello.txt
It will be available for download with url
http://yoursite/depot/????_??_??/XXXXXX/hello.txt
????_??_?? is the date
XXXXXX is a random string.
==== Security ====
Disallow any Handler or Type mechanism in the upload hierarchy.
=== Example in a apache config file ===
# /etc/apache/conf.d/upload.conf
php_flag engine off
php_flag engine off
=== Example in upload directory ===
# File /var/www/depot/.htaccess
# You need and override for the directory /var/www/depot/ :
#
# AllowOverride FileInfo
#
php_flag engine off
php_flag engine off
See also the file depot/.htaccess
in the upload directory