Site registry and domain management
The site registry is a table in the main Jadu Central database, JaduSiteRegistry. It maps the domain of an incoming request to the database in which that site's content is stored, and determines whether that domain can be used to access the Jadu Central management interface, the Control Center.
The first entry in the site registry is created by the Jadu Central installer using values you provide, and is the default domain that the site and Control Center are served on.
Additional entries are added when Galaxies sites are created and published.
Configuring a separate domain for the Control Center
Jadu Central can be set to serve content to the public on one domain, eg. www.example.com and secure content on a second domain, eg. secure.example.com.
- Update each existing site registry entry, set isControlCentreto 0.
- Add a new entry to the site registry for the main site and each galaxies site.
- dbNameis the name of the database this site's content is stored in.
- siteUrlis the domain to server content on.
- siteNameis the name of the site.
- isMainSiteis 1 if this is the main site, 0 in all other cases.
- isControlCentreis 1 if the Control Center is available on this domain, 0 in all other cases.
- GUIDis the Globally Unique Identifier used on other entries for this database name.
- preferredConnectionType,- dbDSN,- dbUsernameand- dbPasswordcan all be left blank.
 
- Update the values of the following constants:
- SSL_ENABLEDto- true
- SECURE_DOMAINto your secure domain
- FORCE_SECURE_CCto- true
- BLOG_ADMIN_URLto use your secure domain. eg. https://cms.example.com/blogAdmin
 
- Update cookie domain by changing the following constant:
- TEST_COOKIE_DOMAINto the wildcard domain
 
- Clear the application's data cache.
The function getSecureSiteRootURL() will return the secure domain of the site, and should be used in templates that link to secure content.
After changing the site's configuration in the site registry, Galaxies sites that exist at the point the change is made must be updated manually.New galaxies sites created in Jadu Central will automatically generate the appropriate records.
Changing the hostname of a site
Jadu Central will only serve pages on hostnames that it knows about. Attempting to request pages using any other hostnames will result in an HTTP 404 error page and the following error being written to the PHP error log:
[30-Jul-2019 17:24:02 Europe/London] Unable to find the site my-super-awesome-site.com
The list of hostnames that content will be served on resides in the database table JaduSiteRegistry.
If you have a fresh installation or development image, you should have a single record in this table for the main site. In this case, it is safe to just run an update query to change the hostname to the one you desire.
If you are changing the value of an existing entry on an established site with lots of data, you may wish to perform a database find & replace for any occurrences of the old value within records across the site.
If you access a Jadu Central site using an address not present in the site registry, such as the IP address of the server, then an error message will be shown, "site not found", and the page will not be rendered.