Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache timeout & uploading large files

Status
Not open for further replies.

opensource2009

Programmer
Jul 24, 2009
1
CA
Hi all,

I have a client who wants to upload large files to their website. The timeout of Apache is set to a low value to minimize the effects of DOS attacks.

How do I enable my client from uploading large files? I have the following options in mind, please let me know which one you recommend and why (or if you recommend a solution that I haven't mentioned):

1. Increase the timeout value.
2. Use an FTP server and ask the users to upload their files using an FTP client.
3. Install another Apache webserver on the same machine but listening to port 81, for example. The uploaded file will be submitted to the second webserver, which has a high timeout value.
4. Is there a solution using Javascript to upload the file on chunks? If so, I can upload every 1MB in one form submit until the file is fully transferred.

If possible, I'd like to implement option #4 as it is a seamless solution, it gives the user an idea of how long it will take to complete the upload, and the timeout value is still low at the same time.

Thanks in advance
 
I don't think that this is caused by the KeepAliveTimeout directive but rather the limit set in php.ini for the max file size that can be uploaded. You can set specific php values for each domain by adding a php_value directive to the vhost's directives. For example, let's say you just want this one domain to be able to upload 20MB files, then you would add this to his vhost container:

<IfModule mod_php5.c>

php_value upoad_max_filesize 20M

</IfModule>

Everyone else would stay at the default. This assumes you are running php as a module and that your client is using php as his upload script.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top