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.

Virtual Subdomains and Wildcards

Discussion in 'General Discussion' started by w3media, Sep 1, 2007.

  1. w3media

    w3media Registered

    Joined:
    Sep 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    People,

    I am searching and searching for over 7 hours now to get my website working on cPanel.

    I have a website which was running on Plesk 7.5 for several years. Now I sold the website and the buyer wants me to install it on his hosting server running:

    WHM 11.2.0 cPanel 11.10.0-S16448 + CENTOS Enterprise 5 i686 - WHM X v3.1.0

    What I did was:
    1. Uploaded all files using FTP
    2. Imported the complete database and the front page is working.

    To get the virtual subdomains working I did:
    3. Add a A record called * linked to the IP of the server/website
    4. opened /usr/local/apache/conf/httpd.conf and searched for:

    Code:
    <VirtualHost 85.17.177.209>
    ServerAlias www.geilestart.com
    ServerAdmin webmaster@geilestart.com
    DocumentRoot /home/geilesta/public_html
    ServerName geilestart.com
    
    User geilesta
    Group geilesta
    BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
    CustomLog /usr/local/apache/domlogs/geilestart.com combined
    ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
    </VirtualHost>
    
    I've changed this to:
    Code:
    <VirtualHost 85.17.177.209>
    ServerAlias www.geilestart.com *.geilestart.com
    ServerAdmin webmaster@geilestart.com
    DocumentRoot /home/geilesta/public_html
    ServerName geilestart.com
    
    User geilesta
    Group geilesta
    BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
    CustomLog /usr/local/apache/domlogs/geilestart.com combined
    ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
    </VirtualHost>
    
    After this action:
    5. service httpd restart

    I can see the website's frontpage on www.geilestart.com but when I click a subdomain like http://uw.geilestart.com/ I see:

    Great Success !
    Apache is working on your cPanel® and WHM™ Server


    Anyone any idea what is wrong?

    Any help will be much appreciated!

    Best regards,

    w3Media
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Should be:


    Code:
    <VirtualHost 85.17.177.209>
    ServerAlias www.geilestart.com
    ServerAdmin webmaster@geilestart.com
    DocumentRoot /home/geilesta/public_html
    ServerName geilestart.com
    
    User geilesta
    Group geilesta
    BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
    CustomLog /usr/local/apache/domlogs/geilestart.com combined
    ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
    </VirtualHost>
    
    
    <VirtualHost 85.17.177.209>
    ServerAlias www.[COLOR="Red"]uw.[/COLOR]geilestart.com
    ServerAdmin webmaster@geilestart.com
    DocumentRoot /home/geilesta/public_html/[COLOR="Red"]uw[/COLOR]
    ServerName geilestart.com
    
    User geilesta
    Group geilesta
    BytesLog /usr/local/apache/domlogs[COLOR="red"][COLOR="Red"]/uw.[/COLOR][/COLOR]geilestart.com-bytes_log
    CustomLog /usr/local/apache/domlogs/geilestart.com combined
    ScriptAlias /cgi-bin/ /home/geilesta/public_html[COLOR="Red"]/uw/[/COLOR]cgi-bin/
    </VirtualHost>
    
    
    Creating a subdomain via the accounts cPanel should have added these correctly.
    Any reason you choose to go the manual route? Just curious.
     
  3. w3media

    w3media Registered

    Joined:
    Sep 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Because the website is a so called 'Startpage script' where users can create their own subdomain pages realtime ;)
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Looks like porn to me. ;)
     
  5. Danny_T

    Danny_T Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    181
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Netherlands
    You have also to put a * record in your DNS zone to have this working.
     
Loading...

Share This Page