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.

Can this be deleted of apache file

Discussion in 'EasyApache' started by DWHS.net, Oct 8, 2002.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,549
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I have about 100 of these random lines on my apache file.

    #NameVirtualHost ##.250.###.###:80

    NameVirtualHost ##.250.###.###:80

    Are they place holding anything or can I delete them all.

    Thank you,

    Charles
     
  2. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,549
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I think I said this wrong.

    In my apache file I have several stray ones.

    Oviously the ones connected to a account need to stay but what about the ones in between the actual accounts.

    there are about 50 just sitting there why?

    Can get rid of these, I also think this what teels the bandwidth monitor that cancelled accounts are still there.

    Any help is great thank you,

    Charles
     
  3. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:2a99c7b7fb][i:2a99c7b7fb]Originally posted by DWHS.net[/i:2a99c7b7fb]

    I think I said this wrong.

    In my apache file I have several stray ones.

    Oviously the ones connected to a account need to stay but what about the ones in between the actual accounts.

    there are about 50 just sitting there why?

    Can get rid of these, I also think this what teels the bandwidth monitor that cancelled accounts are still there.

    Any help is great thank you,

    Charles[/quote:2a99c7b7fb]

    You can remove any commented out NameVirtualHost, in other words you can remove any NameVirtualHost which has a [b:2a99c7b7fb]#[/b:2a99c7b7fb] in front of it like this:
    [b:2a99c7b7fb]#NameVirtualHost xxx.250.xxx.xxx:80[/b:2a99c7b7fb]

    but you [b:2a99c7b7fb]cannot[/b:2a99c7b7fb] remove any NameVirtualHost

    If you offer name based hosting (name-based virtual hosts should be used) a NameVirtualHost directive must appear with the IP address set to be used for the name-based virtualhosts. In other words, you must have the IP address that holds the hostname aliases (CNAMEs) for your name-based virtualhosts via a NameVirtualHost directive in your configuration file. (httpd.conf)

    Multiple NameVirtualHost directives can be used each with a set of VirtualHost directives but only one NameVirtualHost directive should be used for each specific IP : port pair.

    Unless a NameVirtualHost directive is used for a specific IP address the first virtualhost with that address is treated as an IP-based virtualhost. (IP based account)
     
  4. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,549
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Thank you very much, if you don't mind one question about this.

    Here is a example of the ones that are not commented out.

    I put a &&& next to the stray one this one should stay correct.

    Thank you,

    &VirtualHost 66.250.110.131&
    BytesLog domlogs/####-bytes_log
    User ####
    Group ####
    ServerName ####
    ServerAdmin ####
    DocumentRoot /home/###/public_html/###
    CustomLog domlogs/#### combined
    ScriptAlias /cgi-bin/ /home/###/public_html/####cgi-bin/
    User ###
    Group #####
    &/VirtualHost&



    NameVirtualHost 66.250.110.###:80 &&&


    &VirtualHost 66.250.110.131&
    ServerAdmin #####
    DocumentRoot /home/####/public_html
    BytesLog domlogs/####-bytes_log
    User ####
    Group ###
    ServerName ####
    ServerAlias ####
    CustomLog domlogs/##### combined
    ScriptAlias /cgi-bin/ /home/####/public_html/cgi-bin/

    &/VirtualHost&


    NameVirtualHost 66.250.110.###:80 &&&


    NameVirtualHost 66.250.110.###:80 &&&

    &VirtualHost 66.250.110.131&
    BytesLog domlogs/###-bytes_log
    User ###
    Group ###
    ServerName ####
    ServerAdmin wwwadmin@####
    DocumentRoot /home/####/public_html/###
    CustomLog domlogs/####combined
    ScriptAlias /cgi-bin/ /home/####/public_html/####/cgi-bin/
    User ####
    Group #####
    &/VirtualHost&
    #Added by cpanel 5.0.0-STABLE_108 install &&&


    I put several ### to hide infprmation.

    Thanks again,

    Charles
     
  5. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:a6ab217312][i:a6ab217312]Originally posted by itf[/i:a6ab217312]

    [quote:a6ab217312][i:a6ab217312]Originally posted by DWHS.net[/i:a6ab217312]

    I think I said this wrong.

    In my apache file I have several stray ones.

    Oviously the ones connected to a account need to stay but what about the ones in between the actual accounts.

    there are about 50 just sitting there why?

    Can get rid of these, I also think this what teels the bandwidth monitor that cancelled accounts are still there.

    Any help is great thank you,

    Charles[/quote:a6ab217312]

    You can remove any commented out NameVirtualHost, in other words you can remove any NameVirtualHost which has a [b:a6ab217312]#[/b:a6ab217312] in front of it like this:
    [b:a6ab217312]#NameVirtualHost xxx.250.xxx.xxx:80[/b:a6ab217312]

    but you [b:a6ab217312]cannot[/b:a6ab217312] remove any NameVirtualHost

    If you offer name based hosting (name-based virtual hosts should be used) a NameVirtualHost directive must appear with the IP address set to be used for the name-based virtualhosts. In other words, you must have the IP address that holds the hostname aliases (CNAMEs) for your name-based virtualhosts via a NameVirtualHost directive in your configuration file. (httpd.conf)

    [b:a6ab217312]Multiple NameVirtualHost directives can be used each with a set of VirtualHost directives but only one NameVirtualHost directive should be used for each specific IP : port pair.[/b:a6ab217312]

    Unless a NameVirtualHost directive is used for a specific IP address the first virtualhost with that address is treated as an IP-based virtualhost. (IP based account)[/quote:a6ab217312]

    As you removed IP addresses I cannot recommend which one can be removed, read my post carefully,

    However, let me show you an easier way:

    restart your apache and check the errors
    if you found like this line in the errors

    [b:a6ab217312] [warn] NameVirtualHost 10.20.30.40:80 has no VirtualHosts[/b:a6ab217312]

    then you can modify httpd.conf this way:
    You [b:a6ab217312]must[/b:a6ab217312] keep one of
    [b:a6ab217312]NameVirtualHost 10.20.30.40:80[/b:a6ab217312]
    lines and remove its duplicates but you have not to remove any other NameVirtualHost directive
    This directive is necessary as I explained for name based hosting
    If there isn't such error you should not remove any NameVirtualHost line.
     
  6. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,549
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Thank you very much, itf
     
Loading...

Share This Page