New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Create extra folder in home directory when creating users

Started by Kockel, September 18, 2024, 07:47:59 AM

Previous topic - Next topic

Kockel

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?


Kockel

<?php
function account_new($array){
        mkdir("/home/$array[username]/logs", 0755);
}
?>

Solved with cwp hooks