Thread: Major Additions - Links and Downloads Manager
View Single Post
  #1671  
Old 04-26-2007, 05:38 PM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Poag View Post
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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01817 seconds
  • Memory Usage 1,767KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete