Possibility to change script when creating users
I currently use Laravel framework for my sites and services, it works well but I always need to make manual changes to each user I create on the server.
By default the "home" folder of the sites on CPanel is public_html and laravel is public, so I always need to change this in the WHM files:
and after that run some scripts for these changes to take effect correctly:
It was right here that I got this help on how to make this change and thanks again to you for that. The question is whether there is a way today to make a more correct change that prevents these steps from always being done. For example the content of these: 'var / cpanel / userdata / USERNAME / DOMAIN.COM' It comes pre-written from a standard template if it is possible to edit this template. Mais sobre o texto original" necess"rio fornecer o texto original para ver mais informa""es sobre a tradu""o
'var/cpanel/userdata/USERNAME/DOMAIN.COM'
'var/cpanel/userdata/USERNAME/DOMAIN.COM_SSL'and after that run some scripts for these changes to take effect correctly:
/scripts/updateuserdatacache
mv /etc/apache2/conf/httpd.conf{,.bk}
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpdIt was right here that I got this help on how to make this change and thanks again to you for that. The question is whether there is a way today to make a more correct change that prevents these steps from always being done. For example the content of these: 'var / cpanel / userdata / USERNAME / DOMAIN.COM' It comes pre-written from a standard template if it is possible to edit this template. Mais sobre o texto original" necess"rio fornecer o texto original para ver mais informa""es sobre a tradu""o
-
Hey there! When you change the document root are you using /home/username/public_html/public? If so, changing the directory root how you are doing is the best way, as that avoids the confusion of trying to use symlinks or redirects. If you wanted to try some automation with that process I'd recommend checking out the Accounts::Create section of our hookable events here: 0 -
what i do is in the document: var/cpanel/userdata/USERNAME/DOMAIN.COM and [...]USERNAME/DOMAIN.COM_SSL change this line: "documentroot: /home/user/public_html" to "documentroot: / home/user/public" and the same in: I already create accounts for an api that I developed, but they still have to go manually changing the "documentroot" of each newly created user. 0 -
Right, I understand that is the current process, but I don't have any pre-built automated ways you could do that at the time of account creation. That would need to be a custom script using the hook system mentioned above. 0 -
i see, i'll study more about it thx !! 0
Please sign in to leave a comment.
Comments
4 comments