all domains to one

Discussion in 'General' started by terryoleary1981, Mar 28, 2008.

  1. terryoleary1981

    terryoleary1981 New Member

    Hi all

    Simple question if i have a main domain of xyz.com and i also have the other domains xyz.co.uk xyz.org how do you get those domains to map to the main xyz.com site. I've dabbled with co-domains but its not working for me so i think i might be doing something from or going down the wrong path.
     
  2. zcworld

    zcworld New Member

    like you want
    zcworld.com
    zcworld.com.au
    zcworld.net.au
    to all show the same page info right ?

    i take it what your trying to get at
    try using ServerAlias
    ServerAlias
    or ServerName
    just add all the top level domains to it
    like
    ServerName zcworld.com
    ServerName zcworld.net.au
    and see how apache takes it
     
  3. terryoleary1981

    terryoleary1981 New Member

    so there isnt a clean way of doing this through the ISP interface.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    All you have to do is add xyz.co.uk, www.xyz.co.uk, xyz.org, and www.xyz.org as Co-Domains to the xyz.com web site.
     
  5. terryoleary1981

    terryoleary1981 New Member

    My co-domains dont seem to be working, or i maybe doing them incorrectly.

    I have a site spongecat.com and want to point spongecat.es, spongecat.fr and spongecat.nl to spongecat.com but without using a redirect directive.

    So i have created the site in ISPconfig for spongecat.com and have added to the co-domain panel the entries for each domain (including the www host or without) but when i browse to the addresses i get a server error.

    Do i need to create the other sites as sites in ISPconfig before adding them to the co-domain option or should this just work?

    I'd like users to browse to any of the addresses and see the same site without the address bar changing eg no redirects.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the exact error message? Any errors in Apache's error log? What's in Vhosts_ispconfig.conf?
     
  7. terryoleary1981

    terryoleary1981 New Member

    I get the following error...

    Unable to determine IP address fro host name for www.spongecat.es


    Code:
    File: Vhosts_i~ig.conf  Line 59 Col 0      32943 bytes                        8%
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^admin\.spongecat\.com [NC]
    RewriteRule   ^/(.*)$  http://www.spongecat.com/admin$1  [R]
    </VirtualHost>
    #
    <IfModule mod_ssl.c>
    <VirtualHost 192.168.1.108:443>
    SSLCertificateChainFile /var/www/web1/ssl/gd_intermediate_bundle.crt
    ServerName www.spongecat.com:443
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias spongecat.com spongecat.co.uk www.spongecat.cn spongecat.es admin.spongecat.com www.
    spongecat.eu spongecat.eu spongecat.cn www.spongecat.es
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 i
    ndex.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ScriptAlias  /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    1Help   2UnWrap 3Quit   4Hex    5Line   6RxSrch 7Search 8Raw    9Unform 10Quit
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Please create an A record for www.spongecat.es.

    Code:
    mh1:~# dig www.spongecat.es
    
    ; <<>> DiG 9.3.4 <<>> www.spongecat.es
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 26881
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.spongecat.es.              IN      A
    
    ;; AUTHORITY SECTION:
    es.                     3600    IN      SOA     ns1.nic.es. hostmaster.nic.es. 2008062900 7200 7200 2592000 3600
    
    ;; Query time: 66 msec
    ;; SERVER: 145.253.2.75#53(145.253.2.75)
    ;; WHEN: Sun Jun 29 13:46:16 2008
    ;; MSG SIZE  rcvd: 89
    
    mh1:~#
     

Share This Page