Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member Vatoloco's Avatar
    Join Date
    Jun 2004
    Posts
    100

    Default Deleting virtualhost entries in httpd.conf?

    NameVirtualHost 55.55.555.55:80


    <VirtualHost 55.55.555.55>
    BytesLog domlogs/cpanel.ev1servers.net-bytes_log
    ServerName cpanel.ev1servers.net
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>


    NameVirtualHost 55.55.555.55:80


    <VirtualHost 55.55.555.55>
    ServerName plain.ev1servers.net
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>



    There were multiple entries like this in /etc/httpd/conf/httpd.conf so I went through and changed them all to my host name instead. Well, now I've realized I probably don't need the duplicates so is it okay to delete them? I'm not sure what I can safely remove because both of those entries are preceded by NameVirtualHost 555.55.555.55:80. It's the same IP address and everything. Can I safely delete the duplicate NameVirtualHost entry as well?

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yes, you can. Those are created when EV1 setup the server with their own hostname configured before changing it to the one you choose.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member Vatoloco's Avatar
    Join Date
    Jun 2004
    Posts
    100

    Default

    Quote Originally Posted by chirpy
    Yes, you can. Those are created when EV1 setup the server with their own hostname configured before changing it to the one you choose.
    Thanks! Do I need to leave one of the NameVirtualHost entries? There are only two in the entire file and I can't tell if they go with the ev1servers.net entries or if they are also used for my other virtualhost entries that I need to keep.

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You need the NameVirtualHost directives if you use an IP address more than once in a VirtulHost container. There's no harm in having them in there, but if you do, they should be before any VirtualHost statement uses it.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member Vatoloco's Avatar
    Join Date
    Jun 2004
    Posts
    100

    Default

    Thanks! I think I'll leave them just to be safe then.

  6. #6
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    I clean my conf file up once in a while by moving all NameVirtualHost lines up so they are just before the VirtualHost entries. Then it's easy to see if there are duplicates and I leave just one for each IP.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads & Tags
Similar threads

  1. where can i find the virtualhost info that goes into httpd.conf
    By rs-freddo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-16-2009, 05:36 PM
  2. Where to place httpd.conf VirtualHost include files
    By Netmaking in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-13-2008, 05:36 AM
  3. httpd.conf virtualhost entry
    By useradmin in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-27-2008, 09:47 AM
  4. Change VirtualHost in httpd.conf as user
    By melban in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2004, 11:41 PM
  5. auto-add entry in VirtualHost of httpd.conf ?
    By pats in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-22-2003, 10:54 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube