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.

Domain forwarding problem

Discussion in 'General Discussion' started by SHSaeed, Aug 5, 2002.

  1. SHSaeed

    SHSaeed Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Hi guys,

    I'm having problems getting the domain forwarding to work. I have enabled domain forwarding on xxx.xxx.xxx.66 (it automatically selected it). I added the domain to the redirection map (tried &*.domain.com&, &domain.com& and &www.domain.com&) and also setup a DNS zone to point the domain to xxx.xxx.xxx.66 since it's using our nameservers. Now, when I go to www.domain.com, it shows me the default Apache page where it says that Apache works. I've also tried pinging the domain and it goes to the correct IP address. I've also noticed these lines in httpd.conf

    &VirtualHost xxx.xxx.xxx.66&
    ServerName xxx.xxx.xxx.66
    ServerAdmin root@localhost
    DocumentRoot /dev/null
    ScriptAliasMatch .* /usr/local/cpanel/cgi-sys/domainredirect.cgi
    &/VirtualHost&

    I'm probably missing something really simple here.. Any idea what I might be doing wrong?
     
  2. 4web-space

    4web-space Member

    Joined:
    Jun 21, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Im having the same problem!

    Did you ever figure it out?

    Robbie
     
  3. SHSaeed

    SHSaeed Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    No, I had to use other methods.
     
  4. 4web-space

    4web-space Member

    Joined:
    Jun 21, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Care to elaborate?

    We have tried redirectpermanent tag etc in httpd.conf that doesnt work either

    Robbie
     
  5. SHSaeed

    SHSaeed Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Well, there are better ways if you'd like to do this for many different domains, but we just needed it for this single domain so this is what I did..

    1. Added DNS zone for the 2nd domain (since it's using our nameservers)
    2. Added virtualhost directives to the httpd.conf file:

    &VirtualHost 123.123.123.123&
    BytesLog domlogs/2nddomain.com-bytes_log
    User mainuser
    Group maingroup
    ServerName 2nddomain.com
    ServerAlias *.2nddomain.com
    RedirectMatch (.*) http://www.maindomain.com$1
    &/VirtualHost&

    3. Restarted Apache..
     
  6. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    Put both &domain.com& and &www.domain.com& in the redirection map in WHM (2 lines for each domain you want to forward).
     
Loading...

Share This Page