Skip to content

Commit e911c06

Browse files
committed
Update spaces developer/admin docs
1 parent 03b4df8 commit e911c06

2 files changed

Lines changed: 33 additions & 35 deletions

File tree

docs/mtessx.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/spaces.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Multi-space TeSS
2+
3+
A multi-space enabled TeSS will set the current space based on the Host header of the incoming request
4+
(if there is a Space defined with that host, otherwise it will fallback to the default space).
5+
6+
# Development
7+
8+
To allow your local development server to respond to requests to these hosts,
9+
edit your hosts file (`/etc/hosts` on Linux) to include something like the following, e.g.:
10+
11+
```
12+
127.0.0.1 plants.mytess.training
13+
127.0.0.1 astro.mytess.training
14+
127.0.0.1 whatever.mytess.training
15+
```
16+
17+
This will ensure that if you visit e.g. plants.mytess.training, your browser will route it to your local development server
18+
(you may need to restart your browser after changing the hosts file).
19+
20+
To ensure your Rails application accepts requests to the hosts provided above, you will also need to create a
21+
file `config/initializers/hosts.rb` and add the necessary hosts to Rails' config:
22+
23+
```ruby
24+
Rails.application.config.hosts << '.mytess.training' if Rails.env.development?
25+
```
26+
27+
# Production
28+
29+
To run a multi-space TeSS instance in production you will need to:
30+
31+
* Add a DNS record with a wildcard (e.g. *.mytess.training) to point your server
32+
* Configure your web server (e.g. Apache) to respond to requests to these wildcard domains (e.g. `ServerAlias *.mytess.training`)
33+
* Acquire a wildcard SSL certificate (e.g. via Let's Encrypt/Certbot: <https://certbot.eff.org/instructions?ws=apache&os=snap&tab=wildcard>)

0 commit comments

Comments
 (0)