Faulty httpd.conf - can't rebuild with rebuildhttpd.conf

movielad

Well-Known Member
May 14, 2003
109
2
168
cPanel Access Level
Root Administrator
Twitter
I'm trying to rebuild a faulty httpd.conf file, but am getting stuck with the following issue which occurs during a temporary httpd.conf build:

# WHM DOMAIN FORWARDING VHOST
<VirtualHost >
ServerName
ServerAdmin [email protected]
DocumentRoot /dev/null
ScriptAliasMatch .* /usr/local/cpanel/cgi-sys/domainredirect.cgi
</VirtualHost>

When I try to edit /usr/local/apache/conf/httpd.conf itself, I can't see to locate this particular section and am assuming this is coming from one of the other template files. Is there any way of fixing this quickly?

M.
 

Zishan

Well-Known Member
Aug 6, 2005
107
1
168
You should try:

/usr/local/cpanel/bin/apache_conf_distiller --update

/usr/local/cpanel/bin/build_apache_conf

and then restart Apache
 

vivekvsist

Active Member
May 29, 2007
26
0
151
Backup your httpd.conf and rename it. Then run this command

Code:
/scripts/rebuildhttpdconfig
It will regenerate the httpd.conf file.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I don't entirely understand the issue you are having. What is the exact error message? I'm not aware of any error message that would show the lines you did in your initial post. Please provide the exact error message that is being received and how you determined those lines, which you state aren't in /usr/local/apache/conf/httpd.conf file, comes into play in this issue (where you are seeing those lines occur).