Worelock

Active Member
Mar 23, 2004
37
0
156
Hello Folks,
I have a problem with my server and I am hoping that someone has some answers as to why it is doing what it is doing.

I was checking something in the httpd.conf file earlier and I noticed that there are about 8 domain virtual host records written in the actual httpd.conf file instead of being in their own file in the /usr/local/apache/conf/sites folder.

Is there an easy way to fix this? If I edit the httpd.conf file and create individual records in the /usr/local/apache/conf/sites folder for each domain will that work?

The server is running Apache 2 and PHP 5.2.12

Hope someone has come across this one before.
Cheers
Paul
 

Techstar

Member
Feb 20, 2010
19
0
51
Kochi, India.
Use the folowing cPanel script to check and correct most of the apache mis configurations.

/scripts/rebuildhttpd.conf

Also please elaborate your exact issue so that we can assist you better in this regards.
 

Worelock

Active Member
Mar 23, 2004
37
0
156
Hello Techstar,
Thanks for the reply.
I had used the /scripts/rebuildhttpdconf before I posted here.
I dont really know how to explain the situation any better than I did the first time, but I will try and explain it again.

The server is running:
cPanel 11.25.0-C43473 - WHM 11.25.0 - X 3.9
CENTOS 4.8 i686 standard

Half of the hosted domains on my server have the website configured using an include file located in /usr/local/apache/conf/sites/ for example lets say I have a domain called fredblogs.com the include file would be /usr/local/apache/conf/sites/www.fredblogs.com.conf and it would have the virtual host information in that file.

The other half of the domains are configured in the actual httpd.conf file in /usr/local/apache/conf/httpd.conf. cpanel writes a line like
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES. and then the virtual host configuration after that line.

My question was why has cpanel configured half to the domains using include files and the other half using includes & how do I go about making the server only use the include files for the virtual host configurations, do I edit the httpd.conf file and cut the existing configs out and paste them in to their own include files?

Thanks
Paul
 
Last edited: