Author Topic: How To: HTTP-Download without having maps in two places  (Read 20396 times)

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
How To: HTTP-Download without having maps in two places
« on: June 19, 2007, 01:52:52 pm »
This tutorial should help people out who want to host their own http download repositories for Tremulous gameservers. The advantage of this method is, that all maps, which are running on your server, are automatically available in the map repository.

---

First you have to set up apache on the same machine and create a virtualhost with the following settings:

Code: [Select]

<VirtualHost 000.000.000.000:80>
  ServerName map-repository.your-domain.com
  DocumentRoot /var/www/map-repository
  DirectoryIndex index.htm

  AliasMatch ^/(.*)\.pk3$ /usr/local/games/tremulous/$1.pk3

  <directory "/usr/local/games/tremulous">
    Allow from all
  </directory>

  <directory "/var/www/map-repository">
    Allow from all

    Options +Indexes
  </directory>
</VirtualHost>


Change the paths, domain and ip address to fit your server settings.

The last thing you have to do now is to activate http downloads in your server.cfg:

Code: [Select]

set sv_allowdownload 1
set sv_wwwDownload 1
set sv_wwwBaseURL "http://map-repository.your-domain.com"


Now restart your server and everything is fine. In the end, you could place an index.htm file in /var/www/map-repository like I did:

http://tremulous.servers.dasprids.de/

You could also create a PHP script, which will list all directories and all PK3 files within them, but thats not needed. Apache will now re-route all PK3 files to the browser, but no configuration files.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
How To: HTTP-Download without having maps in two places
« Reply #1 on: October 02, 2007, 08:15:07 pm »
thanks!  thats awesome! :)  :D  :eek:  :wink:  only one thing, can i make it download from my googlepage?
spam spam spam, waste waste waste!

Archangel

  • Guest
Re: How To: HTTP-Download without having maps in two places
« Reply #2 on: July 14, 2008, 07:07:03 pm »
This isn't really useful unless you ARE running apache on your own server. My easy multi-httpd way to do it is -- have a special directory for maps, and symlink all the maps to each of your base/ directories. Then you can do the same to your web dir too.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: How To: HTTP-Download without having maps in two places
« Reply #3 on: July 14, 2008, 07:45:31 pm »
Just use downloads.mercenariesguild.net.
And I doubt google pages will ever work for it due to the URL requirements.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Cosmonaut

  • Posts: 106
  • Turrets: +1/-14
Re: How To: HTTP-Download without having maps in two places
« Reply #4 on: August 22, 2009, 02:04:57 am »
Just use downloads.mercenariesguild.net.
And I doubt google pages will ever work for it due to the URL requirements.

Which one of the directories there is for the tremulous client?

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: How To: HTTP-Download without having maps in two places
« Reply #5 on: August 22, 2009, 07:49:50 pm »
The client will look at /modname/file and we use rewrites to redirect them to the right file even if they are looking somewhere else.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.