Astral God

Well-Known Member
Sep 27, 2010
180
0
66
127.0.0.1
cPanel Access Level
Root Administrator
Hello.

I'm setting up a VPS with WHM. I've set up a domain for testing purposes, and my error_log file is published under /public_html.

How can i move this for this domain and for all future domains to another location ?
I've found some threads on the forum about this but nobody explains how to proceed...
I would like to have this file under /home/user, not /home/user/public_html.

I think it should be changed on "PHP Configuration Editor" in Advanced mode, but what should i insert to configure it as i want ?

Thanks.
 
Last edited:

Astral God

Well-Known Member
Sep 27, 2010
180
0
66
127.0.0.1
cPanel Access Level
Root Administrator
Thanks for the reply.
but if a specify a /username/, all error_logs will be stored under the SAME username, no?

What i want is configure this ONE TIME and all current and future accounts will have this file under their own /username/.
 

morissette

Well-Known Member
May 24, 2009
119
2
66
Austin, TX
cPanel Access Level
Root Administrator
In order to do that you would need to use a custom php.ini for each account this can be done by copying the default php.ini from /usr/local/lib/php.ini to /home/$user/php.ini

you would then need to setup the account to use that php configuration file instead of the default which can be done by adding the following to your .htaccess file for each account:

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/user/public_html
</IfModule>
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
Hello,

If you need to automate this process, just use postwwacct cPanel hook script.

cPanel & WHM Script Hooks

It will make the life easier and it is a one time process, which can be replicated to another server so easily.

Thank you,
Nibin.