Version 4 (modified by 10 years ago) ( diff ) | ,
---|
There are currently two ways to use the webmap:
- The integrated web server is the recommended way although it is still under development
- Using an external web server like apache or nginx
Using the integrated web server
A detailed description can be found here: Integrated Webserver
Using an external web server
The API won't be accessible this way'''
We will use apache and ubuntu to provide an example but any other web server or os may be used in a similar way. We will use "example.com" as our domain, please replace it with your own domain or IP address.
First of, you need to install apache2 (we assume you are logged in as root during this example) using either the official documentation or any other tutorial you find on the net. Basically just run
apt-get install apache2 apache2ctl start
You should now be able to visit "example.com" in your browser and see the apache2 default page. To replace this page with our web map, we go to the default apache2 web directory which is located under /var/www/html and delete the old apache2 index file:
cd /var/www/html rm index.html
we now download the web map files into this directory using wget:
wget "http://websvn.illy.bz/dl.php?repname=7dtd&path=%2Fbinary-improvements%2Fwebserver%2F&isdir=1" -O ws.tar.gz
now we need to extract all the files into the directory:
tar -zxvf ws.tar.gz && mv ./webserver.r171/* ./ && rmdir ./webserver.r171 && rm ws.tar.gz
We are alemost there, just a few final adjustments. Replace the map path in "js/index.js" with the path we will use:
cat js/index.js | sed -e 's|../../map/|map/|' > js/index.js
The final step is to create a symlink, please replace instance_name with the name of your instance and game_name with the name of your game:
ln -s /home/sdtd/instances/instance_name/Random\ Gen/game_name/map ./map
We are done! You may now visit "example.com" with your browser and enjoy the web map of your 7dtd world!