Changes between Initial Version and Version 1 of webmap


Ignore:
Timestamp:
Aug 31, 2014, 9:22:54 PM (10 years ago)
Author:
cynexit
Comment:

initial commit

Legend:

Unmodified
Added
Removed
Modified
  • webmap

    v1 v1  
     1There are currently two ways to use the webmap:
     2* [wiki:"Integrated Webserver" The integrated web server] is the recommended way although it is still under development
     3* Using an external web server like apache or nginx
     4
     5
     6== Using the integrated web server ==
     7A detailed description can be found here: [wiki:"Integrated Webserver"]
     8
     9
     10== Using an external web server ==
     11We 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.
     12
     13First of, you need to install apache2 (we assume you are loged in as root during this example) using either [https://help.ubuntu.com/14.04/serverguide/httpd.html the official documentation] or any other tutorial you find on the net. Basicaly just run
     14
     15{{{
     16apt-get install apache2
     17apache2ctl start
     18}}}
     19
     20You 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:
     21
     22{{{
     23cd /var/www/html
     24rm index.html
     25}}}
     26
     27we now download the web map files into this directory using wget:
     28
     29{{{
     30wget "http://websvn.illy.bz/dl.php?repname=7dtd&path=%2Fbinary-improvements%2Fwebserver%2F&isdir=1" -O ws.tar.gz
     31}}}
     32
     33now we need to extract all the files into the directory:
     34
     35{{{
     36tar -zxvf ws.tar.gz && mv ./webserver.r150/* ./ && rmdir ./webserver.r150 && rm ws.tar.gz
     37}}}
     38
     39We are alemost there, just a few final adjustments. Replace the map path in "js/index.js" with the path we will use:
     40
     41{{{
     42cat js/index.js | sed -e 's|../../map/|map/|' > js/index.js
     43}}}
     44
     45The 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:
     46
     47{{{
     48ln -s /home/sdtd/instances/instance_name/Random\ Gen/game_name/map ./map
     49}}}
     50
     51We are done! You may now visit "example.com" with your browser and enjoy the web map of your 7dtd world!