Tremulous Forum

Community => Servers => Topic started by: DASPRiD on June 19, 2007, 01:52:52 pm

Title: How To: HTTP-Download without having maps in two places
Post by: DASPRiD 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.
Title: How To: HTTP-Download without having maps in two places
Post by: your face 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?
Title: Re: How To: HTTP-Download without having maps in two places
Post by: Archangel 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.
Title: Re: How To: HTTP-Download without having maps in two places
Post by: David 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.
Title: Re: How To: HTTP-Download without having maps in two places
Post by: Cosmonaut 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?
Title: Re: How To: HTTP-Download without having maps in two places
Post by: David 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.