How to add custom conf to some WHM account

You have to first create a directory corresponding to the path above. You can do this as follows

mkdir -p /usr/local/apache/conf/userdata/std/2/username/example.com
cd /usr/local/apache/conf/userdata/std/2/username/example.com
vi virtualhost.conf

Remember to change example.com to the domain for which you are going to create the custom virtualhost configuration and username to the cpanel username of the user corresponding to the domain.

Once you are done with making the modification you can re-create the httpd conf file by running the following command

/scripts/ensure_vhost_includes --all-users
×