private_html to public_html link by default (DEFAULT CHANGE)

Version 1.52

Feature
Finished

New directadmin.conf option, where the internal default is: default_private_html_link=0 such that existing installs will not have any behavior change. New installs have: default_private_html_link=1 in the template: /usr/local/directadmin/data/templates/directadmin.conf so NEW INSTALLS will have this feature enabled by default. Old/existing installs are unaffected. When you add: default_private_html_link=1 any domain created with SSL enabled will have a private_html -> public_html link, instead of a private_html folder. This should save some confusion, as the internet is slowing moving towards 100% https, so there is less need for split folders. Of course, you can still set the private_html to be a folder or link via: User Level -> Domain Setup -> domain.com -> private_html setup for domain.com =============== RESTORES There are several different scenarios to take into consideration. We'll assume default_private_html_link=1 for all of these scenarios (default_private_html_link=0 is the old behavior) A) Merge method: - Empty User and domain are created normally first, then restore in a 2nd step. - or User already exists, then restore to merge from backup For a merge, if private_html->public_html already exists, but the backup has a private_html folder, the private_html folder has priority. The link is removed before the tar extraction, and the data is extracted normally. If private_html is a folder, and the backup has a link, again, the backup has priority. This case means if you had any data in your private_html folder, *it will be deleted*, and replaced with the link from the backup. OLD DATA WILL BE LOST if you had any data in the private_html before the restore. Either way, backups have priority. After a backup has been extracted, if there is no private_html at all in the backup (no link, no folder), then then original private_html, and old value it pointed to, will be restored (in case it was pointing elsewhere). BUT if the file in the backup file: backup/domain.com/domain.conf has private_html_link=1, this causes an extra step to wipe the old private_html and replace it with a link (again, backup has priority, even if there was no link in the file). So if you're doing something creative, where you don't want the domains/domiain.com/private_html in the backup at all, ensure private_html_link=0 is in the domain.conf file. This probably doesn't apply to anyone.. as if it is set to 1, then the link would exist.. so might be a moot point. B) restore creation If the User does not exist prior to restore, then the User/domain will be created by DA at restore time. With this case, the public_html/private_templates are not used, and backup has priority. Related change: https://www.directadmin.com/features.php?id=1786

Interested to try DirectAdmin? Get a 30-day Free Trial!