News:

Come Chat with us live! Learn how HERE!

Main Menu

How To: HTTP-Download without having maps in two places

Started by DASPRiD, June 19, 2007, 01:52:52 PM

DASPRiD

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:


<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:


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.

your face

thanks!  thats awesome! :)  :D  :eek:  :wink:  only one thing, can i make it download from my googlepage?
Quote from: dolby on February 19, 2003, 06:44:44 PM
spam spam spam, waste waste waste!

Archangel

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

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

Quote from: 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.

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

David

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.