Quote:
Originally Posted by Poag
Hi Andrew, the reason I have to run them on seperate ports is down to user load, whena file goes up there are generally 100s of downloads started straight away and these continue for some hours before dieing down to a few per hour.
The problem I have is not bandwidth, but instead memory, to prevent the machine from disk caching I used lighttpd for downloads [it doesn't spawn extra servers] but has less functionality, and apache for web pages.
Thus what I would like is for client to upload to say http://www.example.net/downloads [/home/bob/downloads] but there download to be served from http://www.example.net:81/downloads [/home/bob/downloads]
What I am looking for LDM to do is automatically add the :81 into the download url so they are served from the correct process, instead of having to edit them by hand after using the built in file uploader you have supplied.
So we are using the same physical machine, same file system, simply a seperate process ona different port to serve the files. Keeping downloads and webpages seperate as much as I can
I hope this clears up what I am trying to do
I am sorry for not responding sooner, work has had me tied up recently.
Thanks
-Alex
|
Alex, you should be able to do this with LDM's pseudo 'mod_rewrite', see
http://www.eirma.org/wikis/index.php/Hacking_LDM
LDM has a feature which does simple rewrites on urls at the very last stage before attempting to deliver them. If you combine this with setting force_redirect to 1, then you should be able to get LDM to manage the upload and have lighttpd handle the download.
Try creating a rewrite.txt file something like the following (change to match your site)
RewriteRule /downloads
http://www.example.net:81/downloads
Upload it onto your site and use ldm/admin/settings to point mod_rewrite at it.