setting up Web Aliasdomain

Discussion in 'Installation/Configuration' started by martin1977, May 6, 2009.

  1. martin1977

    martin1977 New Member

    Hello all.

    I am struggeling to setup a redirect from one domain to another.
    I use Debain Lenny and ISPconfig 3 and installed it according to the HowTo "The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3]"

    I have a webpage on domain1.com that is working and want to redirect all request on domain2.com to domain1.com.

    As I understand it it should be possible to do that with "Web Aliasdomain". Unfortunatelly it seems I am too foolish to do that. However, whenever I request domain2.com in the browser I only get the standard Apache Welcome site.
    Could somebody please explain to me how this should be set? It feels I have tried out a lot and I am getting desperate.

    Thank you
    Martin

    P.S.: otherwise the software works nicely so far.
     
  2. kolipoki

    kolipoki New Member

    Hey Martin,

    Newbie here, but... the following might help, thou it is not the procedure you would be looking for. Nonetheless, it will have the same redirect effect in the meantime. In domain1.com, open the Apache welcoming message with an editor (maybe should also make a copy of the original before proceeding with the rest) and substitute the html code with this:

    <HTML>
    <HEAD>
    <TITLE>...</TITLE>
    <META HTTP-EQUIV="refresh" content="1; URL=http://www.domain2.com/">
    </HEAD>
    <BODY>


    </BODY>
    </HTML>


    This should do the job. However, it's kind of a workaround and it's not the server way to redirect if using virtual/multiple hosting.
     
    Last edited: May 6, 2009
  3. martin1977

    martin1977 New Member

    That could work but I would prefer to do it in a different way, e.g. with the implemented function that comes with ISPconfig3.
    As domain2.com is a virtual domain there is no webspace assigned to it. The welcome message must be the global server welcome and I do not want to mess with that one for a single domain.
    Anyway, thank you for your reply but maybe someone knows how to use the implemented "Web Aliasdomain".

    //Martin
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Just add a aliasdomain domain2.com and select as target domain1.com and click on save. Make sure that you have setup the dns records for both domains correctly so that they point to the same IP address.
     
  5. martin1977

    martin1977 New Member

    Hello Till,

    Thank you for your answer. Could you comment on the options "redirect type", "redirect path" and "auto-subdomain" please? I tried different combinations without really knowing what I do here.
    The DNS records point to the same IP.

    Best regards
    Martin
     
  6. martin1977

    martin1977 New Member

    Maybe I should add that domain is always forwarded to /var/www/index.html.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please take a look at the generated vhost file in /etc/apache2/sites-enabled/ to see what the different options do. For apache rewriting, please take a look here and there are also several threads which explain the options here in the forums.

    http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
     
  8. martin1977

    martin1977 New Member

    OK, found the problem.
    This whole confusion was caused by the fact that ISPconfig makes only periodically updates of the config files.
    Changing settings and immediatelly checking the results is a bad idea. Typically it took my system up to 60s to make the changes.

    Thanks for the help.

    Martin
     

Share This Page