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.

****.yourdomain.com >redirect> www.yourdomain.com

Discussion in 'General Discussion' started by mahdionline, Mar 24, 2004.

  1. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    I want to develop a weblog system such as bloger. but i have only one problem in my work and i think i should solve it by dns setting in my linux server.

    i want that every one that type any(****).mydomain.com redirected to www.mydomain.com. because if a add a subdomain per user my httpd.conf become very large.

    how can i do this ?? :confused:

    Regard
     
  2. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    you say me to add a subdomain. but when a weblog have 10000 user , the httpd.conf become very very large.

    and when a user signup in weblog system for a new blog, system don't should add a sundomain( dns entry) per user.

    i want to use a wildcard and recegnition users by username that enter before domainname ( username.mydomain.com)

    and my problem is that how can i set my httpd.conf that anyone that type anyusername.mydomain.com redirected to www.mydomain.com
     
  3. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    Just like thaphantom said.

    edit the zone for mydomain.com by adding an A entry of *

    Then edit httpd.conf to ensure that it has the *.mydomain.com alias.

    This will give you your wildcard.
     
  4. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    hi and thanks,

    i do that , but this site is name base and havenot an dedicated ip.

    when i add an A entry for this site then when i type ****.mydomain.com , it redirect to main ip of server.
     
  5. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    edit httpd.conf to ensure that it has the *.mydomain.com alias.

    Add this line in your virtual server in httpd.conf

    ServerAlias *.mydomain.com

    then

    httpd restart
     
  6. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    very very thanks !:D
     

Share This Page