SOLVED Apache Includes not getting included

verdon

Well-Known Member
Nov 1, 2003
946
18
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Hi,

I've been trying to include something to my httpd.conf file. I'm using Home »Service Configuration »Apache Configuration »Include Editor and adding something to the global Post Virtual Include file. I'm not getting any errors and I can verify that the contents are being written to /etc/apache2/conf.d/includes/post_virtualhost_global.conf but they are not being added to /etc/apache2/conf/httpd.conf no matter how many times I restart apache.

Is there something else I need to do?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello @verdon,

Good question!

The contents of the Apache include files are not directly included in /etc/apache2/conf/httpd.conf. Instead, the Include directive is part of the template used to build /etc/apache2/conf/httpd.conf . EX:

Code:
Include "/etc/apache2/conf.d/includes/post_virtualhost_global.conf"
Per the Apache document linked above:

The Include directive allows inclusion of other configuration files from within the server configuration files.
Thus, your custom changes are enabled, but you won't see them directly in the httpd.conf file.

Let me know if this information helps.

Thank you.