Changing directory structure for all domains?
Hi all,
I didn't found exactly the info I need.
On our new server we need to have the following structure instead of the current one.
We don't understand too much about EA or Apache so, please, give us a guided hand :D
We need that when we create a new user the structure would be like this:
/home/[username]/[domain]/public_html
Also any subdomain or addon domain should follow a similar structure, i.e.:
/home/[username]/[domain_addon_or_subdomain]/public_html
Where the [domain]/public_html or [domain_addon_or_subdomain]/public_html could be changed by hand at CPanel)
This should be done at new user or new domain creation and not at the command line afterwards.
Is it possible? How?
Thanks a lot for any help.
Lopo
Found this at [removed - external URL] but this is to change afterwards and not on creation and automatically.
-
Hello @ipublicis, First, note that for subdomains or addon domain names, you can turn off the following option under the Domains tab in WHM >> Tweak Settings: Restrict document roots to public_html This will allow customers to setup subdomains and addon domain names with a document root outside of the public_html directory at the time they are created. As far as the primary domain name, there's currently no feature that will allow you to modify the default document root setting for the domain name utilized during account creation. I encourage you to vote and add a comment to the following feature request to note that you'd like such a feature to include the ability to modify the default document root: /var/cpanel/userdata/username/domain.tld /var/cpanel/userdata/username/domain.tld_SSL 2. Remove the existing cache files: rm /var/cpanel/userdata/username/domain.tld.cache rm /var/cpanel/userdata/username/domain.tld_SSL.cache
3. Rebuild the cache files and the Apache configuration file:/scripts/updateuserdatacache /scripts/rebuildhttpdconf
4. Restart Apache:/scripts/restartsrv_httpd
If you want this to happen automatically, then you'd need to develop a custom bash script that performs the above steps and then configure the custom bash script to run automatically during the account creation process using a post "Accounts::Create" hook. Here are some documents to help you get started should you want to set that up: We provide a list of companies offering system administration services on the following URL if you need help developing the custom bash script:0 -
With just 24 request when do you think this feature will be available? 0 -
Hello @ipublicis, A significant number of votes certainly helps bring attention to a feature request, but it's not the only factor we use when determining which features to implement. We don't have a specific time frame to offer on when we'll add this specific feature to the product (if it's accepted). Voting for the request will automatically subscribe you to it so that you will receive email updates on the status of the feature as they occur. I also encourage you to add a comment to the request explaining why you'd like to see this feature implemented in the product. Thank you. 0 -
Hi I think you have a misspeling at 1. or 2. because it doesn't seem correcto to me removing the file I just change :) Thnaks in advance. Lopo 0 -
Hello @ipublicis, Good catch! I've edited that post to reflect the correct location to the cache files. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments