Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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't find vhost file

Discussion in 'General Discussion' started by umar_hyve, Sep 10, 2012.

  1. umar_hyve

    umar_hyve Registered

    Sep 10, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    We want to install ssl certificate on our website and we need to make dns change. We cant afford
    down time. We were just thinking if its possible to edit a vhost file on centos which might help keeps the site up and running meanwhile dns settings propagate on the internet, i.e; Can we have two ip's configured at the same time in vhost file for a website.

    Can anyone help in this regard? Thanks

    Muhammad Umar Hanif
    Systems Engineer
    #1 umar_hyve, Sep 10, 2012
    Last edited: Sep 11, 2012
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Muhammad,

    You cannot manually change the Apache virtualhost entries in /usr/local/apache/conf/httpd.conf file, because those changes will be wiped upon Apache recompile (/scripts/easyapache) or rebuild (/scripts/rebuildhttpdconf).

    Additionally, editing /var/cpanel/userdata/username/ file (where username is the cPanel username and is the domain name) for the file that is used to build the VirtualHost does not accept two IPs in the "ip: IP#" line.

    You might need to remove the virtualhost entry in /var/cpanel/userdata/username/ location by moving the file to /root/, and create an include at /usr/local/apache/conf/includes/post_virtualhost_global.conf location instead to have the IPs as you'd like it to be bound. After making any such changes, you'll need to do the following:

    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak120911
    /etc/init.d/httpd restart

Share This Page