Why doesn't my custom virtual directive includes appear in the httpd.conf?

robertnorris

Registered
Apr 23, 2011
2
0
51
hi there,

I followed the instructions at Changes Contained within a VirtualHost Directive

and thought I'd try including a custom file for all virtual hosts by putting custom.conf in the folder for all VirtualHost containers: /usr/local/apache/conf/userdata/$includename.conf

Restart httpd. No difference to the httpd.conf.

So I thought I'd try my luck by doing one specifically for an addon domain.

I copied the address from the httpd.conf ie /usr/local/apache/conf/userdata/std/2/myuser/mydomain.com/*.conf

I uncommented this line also.

Restart httpd. No difference to the httpd.conf file..

What am I missing? I've done this before on a different server using cpanel. Do I have to enable something somewhere to include custom conf files?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Did you also run these commands?

Code:
/scripts/verify_vhost_includes
/scripts/ensure_vhost_includes --all-users
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
If not, you do need to have the "/scripts/ensure_vhost_includes --all-users" command processed before restarting Apache, since it's a requirement to add the include into the httpd.conf file using that command.