The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Build apache conf script ignoring Virtual Host Server Alias userdata

Discussion in 'EasyApache' started by jdraxler, Aug 19, 2014.

  1. jdraxler

    jdraxler Member

    Joined:
    Aug 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. jdraxler

    jdraxler Member

    Joined:
    Aug 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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>
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. jdraxler

    jdraxler Member

    Joined:
    Aug 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. jdraxler

    jdraxler Member

    Joined:
    Aug 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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
     
  8. jdraxler

    jdraxler Member

    Joined:
    Aug 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I meant to say that "...when I run the build_apache_conf or rebuildhttpdconf the values in the userdata do NOT get used"
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page