Host multiple writefreely blogs on a single instance with custom domains
- Install writefreely and get up and running with a single blog behind a proxy server e.g.
https://original.writefree.ly - Add DNS A records for additional custom domains (can be anything, doesn't have to be a subdomain or anything) e.g.
additional.writefree.lyoradditional.site.com - Update config (config.ini in the writefreely directory)
- single_user -> false
- max_blogs -> 0
- private -> false
- Restart writefreely service:
sudo systemctl restart writefreely - Blog menu should now be available. Create extra blogs as required. Should be accessible using the name as a subfolder e.g.
https://original.writefree.ly/additional/ - Add nginx config as per original site with the new server name as well as 2 additional lines in the proxy section to remove the subdirectory:
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8080/additional/;
sub_filter '/additional/' '/';
sub_filter_once off;
proxy_redirect off;
}
- Sym link and restart nginx
- Use certbot to add SSL cert for the new domain
- Browse to new site at
https://additional.writefree.ly