Knowledgebase

Portal Home > Knowledgebase > Articles Database > Setting up download server with Lighttpd


Setting up download server with Lighttpd




Posted by Doh004, 08-08-2008, 09:33 AM
Greetings, I'm looking in to getting a second server, specifically for downloads for my site. Without going into too much detail, my website requires that I get a separate server for downloads, and another for the webserver. I've already gone ahead and configured the server I want; however, I'm trying to do something different from what I'm used to. I'd like to use Lighttpd, instead of apache, as well as not having cPanel installed on the server. I'd still have cPanel and Apache on my regular webserver, but I'd rather keep my download server relatively clean. So, once I get my server, and I install Lighttpd, how do I go about setting up everything so that my two servers can communicate? I'd like the download server to be something like: download.mydomain.com , so would I have to set up an A Hostname on my webserver? What are the steps I should take?

Posted by evilghost, 08-08-2008, 10:40 AM
Expand on 'communicate'.

Posted by Doh004, 08-08-2008, 10:55 AM
For example, a user attempts to download a file from the main webserver at download.php . The script goes through its steps, then retrieves the file's location and sends the file to the user? I don't think I'd have php compiled on the server.

Posted by evilghost, 08-08-2008, 11:30 AM
To me, it's nothing more than configured LightHTTPD without directory indexing, an index.html with a redirect to the main site, and the downloadable content in the directory. Your main server would just point them to http://download.whatever.com/content.zip If you want to avoid hotlinking/etc you'll need to configure some PHP code with tokens or referer. http://trac.lighttpd.net/trac/wiki/Docs

Posted by datums, 08-08-2008, 11:54 AM
as posted above. setup downloads.domain.com on server 2, point the A RECORD. in any download links reference downloads.domain.com

Posted by Doh004, 08-08-2008, 04:12 PM
So will I need PHP configured on the download server than? Also, will I set up the A record on the main webserver?

Posted by evilghost, 08-08-2008, 04:18 PM
I don't think I'm the person to tell you what you need or don't need, I have no idea what your requirements are. I thought my reply was clear but perhaps it wasn't, I'm sorry for that. The A record needs to be setup on the DNS server. You point your downloads to the download servers FQDN.

Posted by Doh004, 08-09-2008, 10:09 AM
Alrighty. My new servers are up, and I've gone ahead and installed Lighttpd and configured it. I've added a virtualhost for my download.domain.com , now I believe the only step I'm missing is adding the A Hostname to my webserver so that it forwards those requests to the new IP... I've tried to do this in WHM but I can't seem to find it anywhere. Am I looking in the wrong places? *Edit* I just added a DNS Zone entry to my server, and it appears that it now works with the IP and the subdomain... Is this the wrong way to do it? Last edited by Doh004; 08-09-2008 at 10:16 AM.

Posted by cabron, 08-09-2008, 12:37 PM
If you configured the dns zone correctly you should be just fine.. so if it works with the subdomain you've done it right



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
postini vs. spamsoap (Views: 542)
Weird RSS Feed Issue (Views: 554)


Language:

Contact us