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.

defaultwebpage.cgi Redirection

Discussion in 'General Discussion' started by RamiroS, Apr 23, 2011.

  1. RamiroS

    RamiroS Member

    Joined:
    Aug 23, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hello. I've moved servers and now I have a problem with a subdomain.

    Subdomain is for example: subdomain.domain.com (has a SSL certificate also)

    But I've found that in cPanel (under subdomains) it has a different document root... I've checked httpd.conf, fixed the error and restarted httpd but cPanel keeps pointing (and showing) to the old (bad) direction.
     
  2. RamiroS

    RamiroS Member

    Joined:
    Aug 23, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I've opted to delete the subdomain and recreated it... same issue.
     
  3. lijeeshsd

    lijeeshsd Active Member

    Joined:
    Apr 22, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Did you run '/usr/local/cpanel/bin/apache_conf_distiller --update' after correcting document root in httpd.conf?
     
  4. 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
    You shouldn't directly edit httpd.conf at any point for the individual VirtualHost entries. This is why it has this above each VirtualHost entry in /usr/local/apache/conf/httpd.conf file:

    The proper way to change the document root would be to go to /var/cpanel/userdata/username location (where username is the cPanel username), then edit the subdomain.domain.com file there for the documentroot and homedir fields to have the right path. After editing, simply save the file, then run these commands to back up the httpd.conf, rebuild it and restart Apache:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110427
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    If this still appears to not work for you, you may simply be cached. You could try checking in a proxy such as proxify.net or kproxy.com to see if the subdomain is working properly at that point. If it is in a proxy, your system is cached to the old location and that caching should clear up in 24-48 hours time.
     
Loading...

Share This Page