- Temporarily elevate privileges using
sudoto edit app.yml
sudo nano /var/discourse/containers/app.yml
- Edit the Discourse configuration file
app.yml
You only need to configure the main domain and alias relationships in the Discourse configuration file app.yml:
DISCOURSE_HOSTNAME: 'www.discourse.cc' # Your main domain (final access address)
DISCOURSE_HOSTNAME_ALIASES: 'discourse.cc' # Other aliases, which will automatically redirect to the main domain
Please note:
DISCOURSE_HOSTNAMEshould be followed by the “main domain” you want users to ultimately access, whileDISCOURSE_HOSTNAME_ALIASESshould contain the “aliases” you want to redirect to the main domain.
After editing, save the file (Ctrl+O, Enter,Ctrl+Xto exit).
- Finally, rebuild using root privileges:
cd /var/discoursesudo ./launcher rebuild app