Bulk private_html to public_html symlinks for existing domains

harro

Verified User
Joined
Oct 15, 2005
Messages
178
Hi,

With the push for 100% https website access, I would like to know whether there is an easy (automated) way to generate/create the private_html to public_html symlinks for existing domains.


I have activated the default_private_html_link=1 option in my existing DA installs but if I understand correctly, this only affects new domains. There are many existing domains that do not have this symlink yet and I would like to provide this service to all my users.


Thank you and I look forward to your suggestions and ideas!
 
The closest starting point that I could find could be a modification (or extension) of the recursive make_dirs.sh script that is highlighted here:

https://help.directadmin.com/item.php?id=47


A condition would need to be added in the code to only make the symlink if there is no content in the /private_html folder (or if it does not exist).

In that case the private_html folder would first have to be deleted (or perhaps moved, just to be doubly sure that nothing of value is inside) and then the symlink put into place.

Considering the large number of views of this question (>1000 already), it would seem to be of interest to more admins - could that be a justification for the DirectAdmin wizards to consider using their bash skills to draft a script?
 
Back
Top