If you have SSH console access, type the following in:
# httpd -V
You will get a few lines, you need to look for "HTTPD_ROOT". In normal cases, if you run centos with cPanel, the path will be /etc/apache. Also look for "SERVER_CONFIG_FILE". This will give you the relative path, something like "conf/httpd.conf". Combine both of them and you will get the full path to the file /etc/apache/conf/httpd.conf
Now just use vi command to edit the file
# vi /etc/apache/conf/httpd.conf
Alternatively you could install the Config Server Explorer inside WHM to directly access this file in a file explorer type window.
If you are only looking to add or override directives from within the apache config, use the WHM/cPanel functionality "Apache Coniguration" under Service Configuration