Build apache conf script ignoring Virtual Host Server Alias userdata

jdraxler

Member
Aug 19, 2014
5
0
1
cPanel Access Level
Root Administrator
I modified the /var/cpanel/userdata/$USER/$DOMAIN & $DOMAIN_SSL files with the serveralias values I want for a specific VHost but when I run /usr/local/cpanel/bin/build_apache_conf it ignores the values and the values do not get written to the /usr/local/apache/conf/httpd.conf file. So then I made changes directly to the httpd.cof file and ran the /usr/local/cpanel/bin/apache_conf_distiller --update (which Distilled successfully) then ran /usr/local/cpanel/bin/build_apache_conf and the values in httpd.conf get overwritten with the original values (not the values I entered directly OR the value I added to the userdata).

I also modified the include files /usr/local/apache/conf/userdata/[std & ssl]/2/$USER/$DOMAIN/extra.conf with the desired serveralias values but when I go the the desired URL im served the incorrect VHost (apache appears to be ignoring the included serveralias values)

If I modify httpd.conf directly and DO NOT rebuild or reload the conf file, then restart apache everything works as it should. But I would like to know how I can force build_apache_conf to use the values from the userdata.

Any help is greatly appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Could you elaborate further on the specific change you want to make? Is it within a VirtualHost?

Thank you.
 

jdraxler

Member
Aug 19, 2014
5
0
1
cPanel Access Level
Root Administrator
I want a VHost to have have several serveralias values (parked domains) for example:

<VirtualHost 1.1.1.1:443>
...
ServerName example.com
ServerAlias example.com example2.com example.org
...
</VurtualHost>
 

jdraxler

Member
Aug 19, 2014
5
0
1
cPanel Access Level
Root Administrator
I already did all of those steps in the link you provided but the server does not direct me to the expected VirtualHost (as though the included file is ignored). And yes the line in the httpd.conf is uncommented.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
We can not assist with custom rules/entries, but we can setup an example/test entry to make sure that method is working as intended. Feel free to open a support ticket using the link in my signature so we can check that for you. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

jdraxler

Member
Aug 19, 2014
5
0
1
cPanel Access Level
Root Administrator
Well the issue that I need assistance with is that I should be able to make direct edits to the httpd.conf file then run the distill script which should store the httpd.conf direct edits in the userdata (which it does) but when I run the build_apache_conf or rebuildhttpdconf the values in the userdata do get used. I used the information/instructions found here: Changes Contained within a VirtualHost Directive
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
At this point it's likely better to open a support ticket so we can take a closer look at the custom entries you have configured.

Thank you.