Aliasdomain problem

Discussion in 'Installation/Configuration' started by vaio, Dec 2, 2010.

  1. vaio

    vaio New Member

    Hello,
    i urgently need this to solve.
    I had domain1.tld and added Aliasdomain domain1.tld2

    After removing aliasdomain, when visiting domain1.tld2 it still wants to redirect to domain1.tld.

    how to solve this fast?
    thanks!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the normal behaviour of the apache webserver. If a domain is not in the configuration but points in dns to the server ip, then apache will show the first website that it finds for that ip address.

    There are several solutions, e.g. create a nwe website for domain1.tld2 or change the dns record for domain1.tld2 so that it points to a different server where you wnat to host domain1.tld2
     
  3. vaio

    vaio New Member

    Hello Till!

    I have one server. I have added DNS & site for domain1. Than i have added DNS for domain2 and used 'Aliasdomain for website'. This will work if i want domain2 to be same as domain1 (redirect right?).

    But i want them now to be separated, eash site on it's own.
    So i removed 'Aliasdomain' but still when enter domain2 as url, it want's to redirect to domain1.

    I hope i have made good description.
    What do you suggest me?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want a separate website, then you have to add a separate website. Thats all.
     
  5. vaio

    vaio New Member

    Of course i have added new website dor domain2,
    but do i need to do anything else, since it still wants to go to domain1

    Do i need to restart server maybe?

    It looks like aliasdomain has stayed, eventhough i have deleted it and created new website....

    i use 3.3.0.1

    EDIT, added: now when i have restarted apache, it apparently started working.... hmm... now i am not sure if restarting apache has hot something to do with it, or it just needed some time?
     
    Last edited: Dec 2, 2010
  6. cbj4074

    cbj4074 Member HowtoForge Supporter

    Does this fix the issue?

    Code:
    service apache2 --reload
    
    If not, tell us more about your DNS configuration. You're pointing both domains to the same IP address, correct?

    Also, you are attempting to access domain1.tld2 over HTTP, and not HTTPS, correct?
     
  7. vaio

    vaio New Member

    I have just missed you for couple of sec. (restated apache just before you suggested)... :)

    Thank you both, Till and cbj4074!!

    SOLUTION Summary:
    :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Every change that you do in the interface needs some time until it gets written to disk.
     
  9. cbj4074

    cbj4074 Member HowtoForge Supporter

    As a final point of note, you may use Webmin to check the status of Apache's configuration files while waiting the few minutes that ISPConfig requires to write the changes to disk.

    In Webmin, go to Servers -> Apache Server -> [choose a server] -> Show Directives.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    That can be done easier in ispconfig: Go to the monitor and click on the jobqueue. As soon as the pending item idisappears in the list, the changes are written to disk successfully.
     
  11. vaio

    vaio New Member

    Hello Till & others,
    i have made a wrong conclusion, still can't get it to work ok.

    I will be more specific, but write domains in codes :)

    1. if you visit: w w w. m i k r o nano[.]com site loads ok from ISP (i left favicon so it's clear)
    2. if you visit without www prefix, you are redirected to mi kro nano [.]si

    NOTE: i have 'Auto-Subdomain: www' activated

    NOTE2: i have also tried with .htaccess:
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^mik....com
    RewriteRule (.*) http://www.mik....com/$1 [R=301,L]
    

    What shall i do more?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Make sure that you entered "m i k r o nano[.]com" and not "www.m i k r o nano[.]com" into the domain field of the website. And remove the .htaccess.
     
  13. vaio

    vaio New Member

    It is correct...
    [​IMG]


    This is only domain i am having problem, but on other hand, it's only domain which was alias for domain *.si
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, you missed to mention that you redirected all domains via a wildcard. So the current behaviour is fine ad as expected as it follows your redirect rules. You will have to delete the wildcard record.
     
  15. vaio

    vaio New Member

    till, may i ask how to delete this wildcard record?

    I have looked in DNS for both domains: .com and .si but i couldn't find it. Also no redirects are specified 'Web domain - Redirects'...


    Really thank you for your efforts!!
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    You said above that you added a wildcard record in the apache configuration, so you should know where to delete it as its deleted in the smae place where it got added. Apache settings are not dns settings.
     

Share This Page