Control Web Panel
WebPanel => Apache => Topic started by: Kockel on September 18, 2024, 07:47:59 AM
-
Hello,
I created a specific virtual host template for websites.
I want to host the log files under the home directory
This is what I added :
# CustomLog /home/kockel/logs/kockel.be.bytes bytes
CustomLog /home/kockel/logs/kockel.be.log combined
ErrorLog /home/kockel/logs/kockel.be.error.log
Everything is created fine when creating a new user.
Only big issue : the logs folder is NOT created...
When rebooting apache, it fails...
Anyone has a solution for this? Are there any template folders that I need to adjust? or a script?
-
Use CWP Account Hooks:
https://wiki.centos-webpanel.com/action-hooks
to create folders inside the account.
-
<?php
function account_new($array){
mkdir("/home/$array[username]/logs", 0755);
}
?>
Solved with cwp hooks