...
Note | ||
---|---|---|
| ||
This document contains a sample configuration but as the sysadmin, it is your responsibility to choose the setup that fits best better your needs and resources. |
...
Note | ||
---|---|---|
| ||
|
...
Once environment has been described, we are going into changes needed to achieve Abiquo UI theming per subdomain.
Abiquo UI configuration
In order to provide different themes per subdomain we need to do some changes in the default UI folder structure, by default looks like:
Code Block |
---|
# tree /var/www/html/ui/
.
??? config
? ??? client-config.json
...
??? theme
? ??? abicloudDefault
... |
We need to create a configuration file and theme folder per each subdomain. In the sample scenario the structure will look like:
Code Block |
---|
# tree /var/www/html/ui/
.
??? config
? ??? theme1.json
? ??? theme2.json
...
??? theme1
? ??? abicloudDefault
??? theme2
? ??? abicloudDefault
... |
You can have different property configuration
...
Abiquo
in each config json file, but most important is that config.endpoint property points to its related API subdomain URL:
Code Block |
---|
grep endpoint /var/www/html/ui/config/*
/var/www/html/ui/config/theme1.json: "config.endpoint": "https://theme1.example.com/api",
/var/www/html/ui/config/theme2.json: "config.endpoint": "https://theme2.example.com/api", |
Now, you can
grep endpoint /var/www/html/ui/config/*
/var/www/html/ui/config/theme1.json: "config.endpoint": "https://theme1.bcn.abiquo.com/api",
/var/www/html/ui/config/theme2.json: "config.endpoint": "https://theme2.bcn.abiquo.com/api",
In the sample scenario the Apache2 SSL front-end is also running the API and Remote Services for Datacenter 1. As has been indicated previously, this is a sample but you will easily extrapolate required configuration
...