-
Notifications
You must be signed in to change notification settings - Fork 20
Installation
To use Routegadget 2 you will require ftp access to your server. If this makes no sense then the following information is not for you.
The necessary files can be downloaded from Github. This zip file includes everything you need to set up a development environment as well as to create a specific installation of Routegadget 2.
The production version is held in the /dist directory. To set up a site:
-
Use ftp to synchronise the files from the /dist directory from the zip file with a /rg2 directory on the server where you want to run Routegadget. Everything sits in a directory called rg2. Data files are held in a separate /kartat directory. This will be created automatically when you first use RG2 if you have not already created it.
-
You need to add a configuration file for your specific implementation. Rename the rg2-config.txt in the zip file to rg2-config.php. Enter the URL for your Routegadget installation. Change other configuration options as necessary. Copy this configuration file to the /rg2 directory on the server.
-
You should end up with a structure similar to:
www.yourdomain.com /kartat (created automatically if not already created) /rg2 /.vite /app /assets /img /lang /lock /log
-
The /rg2 directory should contain:
index.php manifest.json rg2-config.php rg2api.php
Your installation should now be available at e.g. https://www.yourdomain.com/rg2
If things don't work as expected:
- make sure that you have installed the files from the /dist directory
- check your rg2-config.php file
- check that the kartat directory exists
- use the developer tools in your browser (F12 or equivalent) to check for console messages.
If everything looks OK but you are still getting "SyntaxError: Unexpected token <" then you may have managed to insert hidden characters at the start of your rg2-config.php file. For a full discussion of this UTF8 BOM problem see this stackoverflow article.
You can check if this is the problem if you upload the config file to http://en.webhex.net/
The easiest solution is to recreate the config file starting from the github version and using a different text editor (something like notepad in Windows).