• Resolved mat4020

    (@mat4020)


    I have a website (zischina.com) setup as a wordpress multi site the additional sites are added as sub-domains.

    The problem is, any sub-domain redirects me to the cgi-sys/defaultwebpage.cgi page.

    I’ve talked with my host to enable mod_rewrite (permalinks work) in apache and I’ve checked to see if my .htaccess file is correct, and they both seem to be. I also have a A record set up like this: *.zischina.com. A 202.146.219.22.

    This website: http://www.just-ping.com/index.php?vh=year6.zischina.com&c=&s=ping shows that year6.zischina.com is pinging correctly to the IP 202.146.219.22.

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter mat4020

    (@mat4020)

    I should also mention that this was working fine until the host moved my server to a different county (at my request).

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The new server needs the httpd.conf file edited to handle wildcard subdomains. Or … any subdomains.

    Thread Starter mat4020

    (@mat4020)

    I asked the host last week to do this:

    Apache must be configured to accept wildcards.

    1. Open up the httpd.conf file or the include file containing the VHOST entry for your web account.
    2. Add this line:

    ServerAlias *.zischina.com

    Is that what you mean by editing the httpd.conf file? Is their something else that should be added?

    (Also, I have another subdomain outside of the WP Network that works correctly – http://test.zischina.com/)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yes. BUT. You have to put them in order 🙂

    IIRC named subdomains go ABOVE wildcard.

    Thread Starter mat4020

    (@mat4020)

    Ipstenu,

    I really appreciate the help. So, what should I ask the host to do?

    Move “ServerAlias *.zischina.com” up the list?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Kind of…

    It depends a little on your version of Apache and how it’s all set up.

    Basically, what I did was change ServerAlias www.yourdomain.com to ServerAlias *.yourdomain.com

    So the whole thing looked like this:

    <VirtualHost 67.15.245.5>
    ServerAlias *.yourdomain.com
    ServerAdmin webmaster@yourdomain.com
    DocumentRoot /home/yourdoma/public_html/
    [blah blah]
    </VirtualHost>

    If you have a named subdomain, ABOVE that would go:

    <VirtualHost 67.15.245.5>
    ServerAlias test.yourdomain.com
    ServerAdmin webmaster@yourdomain.com
    DocumentRoot /home/yourdoma/public_html/test
    [blah blah]
    </VirtualHost>

    Move “ServerAlias *.zischina.com” up the list?

    Down the list.

    Thread Starter mat4020

    (@mat4020)

    Thanks for all the help! I just sent a link of this thread to the host support and they got everything worked out.

    Thanks again,

    Matt

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Subdomains redirect to defaultwebpage.cgi’ is closed to new replies.