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.

Datastorage for namevirtualhosts

Discussion in 'General Discussion' started by badzilla, Mar 6, 2008.

  1. badzilla

    badzilla Member

    Joined:
    Mar 3, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Where is the datastorage for namevirtualhosts located ?

    My main.default template has these lines

    Code:
    [%- FOREACH nvh IN namevirtualhosts -%]
    NameVirtualHost [% nvh %]
    [% END -%]
    and after a build, it has inserted both IP's that I use, even though only one of them is my shared IP.

    I have tried to change the httpd.conf, and run the apache_distiller, but it's not picking it up.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If there is an IP Address you don't Apache to listen on, then use the Reserved IPs editor in Apache Setup within WHM to disable the IP Address.
     
  3. badzilla

    badzilla Member

    Joined:
    Mar 3, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    I know, and that part is working, but why is it using all the IP addresses that it listen for, to name the NAMEVIRTUALHOST's ?

    In basic settings I set which IP was used for shared hosting, so why not just use that IP for NAMEVIRTUALHOST ?

    Or have I misunderstood the way NAMEVIRTUALHOST is workin.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The Basic Settings has little to do with what the httpd.conf tools are doing. The IP Address defined in Basic Setup is used during account creation. It is not used to define the NameVirtualHost entries.
     
  5. badzilla

    badzilla Member

    Joined:
    Mar 3, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    So what exactly is used to define namevirtualhosts ?

    I'm still wondering why the template doesn't look like this

    Code:
    [%- FOREACH vh IN sharedips -%]
    NameVirtualHost [% vh %]
    [% END -%]
    
    This is the code I have placed in main.local, and it makes httpd.conf look like I would expect.
     

Share This Page