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

Discussion in 'General Discussion' started by bakhanbeigi, Jun 25, 2006.

  1. bakhanbeigi

    bakhanbeigi Registered

    Joined:
    Jun 25, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello

    I am writing weblog system with PHP and I need creat a virual subdomain for each user like this :
    http://user.mydomain.com one of my friend tell me creat this subdomain http://*.mydomain.com in Cpanel and do manage with .htaccess but Cpanel can not creat * subdomain.

    How I can creat subdomains for my users ?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    your need to edit your http.conf and add wild card DNS if you do not root access to the server you can not do this
     
  3. bakhanbeigi

    bakhanbeigi Registered

    Joined:
    Jun 25, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I dont have root access ,
    Is any way like .htaccess ?
     
  4. Shinichi Kato

    Shinichi Kato Well-Known Member

    Joined:
    Mar 7, 2005
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Saitama-ken,japan
    Use .htaccess

    Condition1: Dedicated IP is necessary.
    Condition2: You have to edit DNS zone.
    Condition3: Mod_rewrite engine is necessary for Apache.


    TMS from Japan.
     
  5. bakhanbeigi

    bakhanbeigi Registered

    Joined:
    Jun 25, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    With this conditions now how can I do it ?
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You will need to contact your hosting provider in that case!

    2 things need to be done to setup "Wildcard DNS"
    (which is the name of what you are asking):

    1. A new "A" entry needs to be added to the DNS zone for your domain
    that uses the name "*" and points to your hosting account IP address

    2. The vhost config for your site needs to be manually updated in the
    httpd.conf for the server and a "ServerAlias *.(yourdomain)" command
    needs to be added to your vhost configuration.

    Wrong! A dedicated IP and mod_rewrite is NOT necessary!

    It doesn't matter whether this is setup on shared or dedicated IP addresses
    and mod_rewrite is NOT required to setup wildcard DNS.

    In fact, mod_rewrite wouldn't be of much use either because the server has
    to recognize the wildcard address before it is parsed to the specific host account
    so commands in the .htaccess would never be parsed and you are back to
    needing to setup the wildcard DNS in the main httpd.conf file irregardless.
     
    #6 Spiral, Jun 28, 2007
    Last edited: Jun 28, 2007
  7. bakhanbeigi

    bakhanbeigi Registered

    Joined:
    Jun 25, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have this patametes in my WHM panel are these usefull ?

    Add a DNS Zone
    Delete a DNS Zone
    Edit DNS Zone
    Edit MX Entry
    Edit Zone Templates
    Park a Domain
     
Loading...

Share This Page