SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast saadatshah's Avatar
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question DSN Wild Card Entry Problem

    HI All,

    i ve a problem....i m working on a project in which i need to handle subdomains (without creating virtual block for each user in httpd.conf of apache).........

    when a user register with the site he 'll get a URL like

    www.someuser.mydomain.com


    and when the user write the above address...the request should come 2 the main page of mydomain...so that the user ca b redirected to any particular location or directory......


    the following is my httpd.conf entry......

    ************************************

    <VirtualHost 192.168.0.1>
    ServerAlias www.mydomain.com <http://www.mydomain.com> mydomain.com
    *.mydomain.com
    ServerAdmin webmaster@mydomain.com
    DocumentRoot /home/mydomain/public_html
    BytesLog domlogs/mydomain.com-bytes_log
    User somedomainuser
    Group somedomainuser
    ServerName www.mydomain.com <http://www.mydomain.com>
    ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/
    CustomLog domlogs/mydomain.com combined
    ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/
    </VirtualHost>

    ***************************************

    but i m not getting my desired result.......i m getting server not found message..........can any1 provide any solution for this.........



    Thx

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Try removing the http:// from the ServerName and ServerAlias config lines, then check if you have a wild card entry in the DNS record for the domain name.

    Thank you,
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  3. #3
    SitePoint Enthusiast saadatshah's Avatar
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lets consider the following is my DNS Record.....so tell me how can i edit this record to handle Wild Card *....????


    -----------------------------------

    $ORIGIN yourdomain.com.

    @ 1D IN SOA ns1.granitecanyon.com. please.set.responsible.person. (
    2002091801 ; serial
    8H 2H 1W 1D ; timing
    )
    rp 1D IN TXT "Please set responsible person"
    @ 1D IN RP please.set.responsible.person. rp

    1D IN NS ns1.granitecanyon.com.
    1D IN NS ns2.granitecanyon.com.
    localhost 1D IN A 127.0.0.1
    www 1D IN CNAME mydomain.com.
    @ 1D IN MX 10 mydomain.com
    _http._tcp 1D IN SRV 0 0 80 mydomain.com.
    _http._tls._tcp 1D IN SRV 0 0 443 mydomain.com. ;a.k.a. https
    _smtp._tcp 1D IN SRV 0 0 25 mydomain.com.


    ------------------------------------


    thx

  4. #4
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this..

    <VirtualHost 123.123.123.123>
    ServerAlias www.domain.com domain.com
    ServerAlias domain.com *.domain.com


    add

    * A 123.123.123.123 (Real IP goes there)

    $ORIGIN yourdomain.com.

    @ 1D IN SOA ns1.granitecanyon.com. please.set.responsible.person. (
    2002091801 ; serial
    8H 2H 1W 1D ; timing
    )
    rp 1D IN TXT "Please set responsible person"
    @ 1D IN RP please.set.responsible.person. rp

    1D IN NS ns1.granitecanyon.com.
    1D IN NS ns2.granitecanyon.com.
    * A 123.123.123.123
    localhost 1D IN A 127.0.0.1
    www 1D IN CNAME mydomain.com.
    @ 1D IN MX 10 mydomain.com
    _http._tcp 1D IN SRV 0 0 80 mydomain.com.
    _http._tls._tcp 1D IN SRV 0 0 443 mydomain.com. ;a.k.a. https
    _smtp._tcp 1D IN SRV 0 0 25 mydomain.com.
    Web Hosting - Thats what we do.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •