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

    Joined:
    Sep 10, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    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
    http://hyve.com
     
    #1 umar_hyve, Sep 10, 2012
    Last edited: Sep 11, 2012
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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/domain.com file (where username is the cPanel username and domain.com 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/domain.com location by moving the file to /root/domain.com.vhost.bak, 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:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak120911
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    Thanks!
     
Loading...

Share This Page