Migrating all the map-building documentation to Github.

+ adding links to Youtube tutorials
This commit is contained in:
David Négrier 2021-09-08 10:28:39 +02:00
parent 9ccd967cb8
commit 699097c55b
13 changed files with 302 additions and 72 deletions

25
docs/maps/hosting.md Normal file
View file

@ -0,0 +1,25 @@
{.section-title.accent.text-primary}
# Hosting your map
The [Getting Started](.) page proposes to use a "starter kit" that is relying on GitHub pages for hosting the map. This is a fairly good solution as GitHub pages offers a free and performant hosting.
But using GitHub pages is not necessary. You can host your maps on any webserver.
{.alert.alert-warning}
If you decide to host your maps on your own webserver, you must **configure CORS headers** in your browser to allow access from WorkAdventure.
## Configuring CORS headers
CORS headers ([Cross Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)) are useful when a website want to make some resources accessible to another website. This is exactly what we want to do. We want the map you are designing to be accessible from the WorkAdventure domain (`play.workadventu.re`).
### Enabling CORS for Apache
In order to enable CORS in your Apache configuration, you will need to ensure the `headers` module is enabled.
In your Apache configuration file, simply add the following line inside either the `<Directory>`, `<Location>`, `<Files>` or `<VirtualHost>` sections, or within a `.htaccess` file.
Header set Access-Control-Allow-Origin "*"
### Enabling CORS on another webserver
Check out [enable-cors.org](https://enable-cors.org/server.html) which has detailed instructions on how to enable CORS on many different webservers.