[SOLVED] ISPConfig redirects everything to main site

Discussion in 'Installation/Configuration' started by azuritetechs, Jun 19, 2017.

  1. azuritetechs

    azuritetechs New Member

    Hello,

    I initially had the problem that the new dns zones were redirected to the main site.
    I have been searching the forum for a solution and I found this thread.
    https://www.howtoforge.com/communit...erything-to-main-site-help.71557/#post-336683

    Some of my sites were configured with an IP and others with a *.
    Then I applied the thread solution. I have configured all the websites with the IP. But now if I enter to the main site or other site the browser try to load the main site always like a loop.

    Can someone help me, please? All sites are currently unreachable. The control panel is accessible.

    How

    Thanks
     
  2. Jesse Norell

    Jesse Norell Well-Known Member

    Is it actually a loop (ie. one location redirects to another, which redirects...) or it simply all ends up on your main site? If it's a redirect loop, check your vhost config, and .htaccess files for redirects; if it's not those, the sites could be redirecting in code (eg. php). If you simply end up at the main site all the time, I'd guess something's still not configured the same among your sites, maybe try pasting 'apachectl -S' output (assuming it's apache web server).
     
  3. azuritetechs

    azuritetechs New Member

    Thanks for the reply Jesse.

    If the IPv4-Address of the main site is a IP a loop occurs with the main site and the other sites.
    If the IPv4-Address of the main site is a * and the IPv4-Address of the other sites is a IP or a * a loop don't occurs with the main site and the other sites but all other sites ends up on the main site.

    Is it actually a loop (ie. one location redirects to another, which redirects...) or it simply all ends up on your main site?
    All domains ends up on the main site.

    If it's a redirect loop, check your vhost config, and .htaccess files for redirects; if it's not those, the sites could be redirecting in code (eg. php).
    I will check the vhost, but is the same before the error.
    Any domain has a redirection (configured from ISPConfig) to the main site.
    The .htaccess has not been modified. Same for the php code.

    If you simply end up at the main site all the time, I'd guess something's still not configured the same among your sites, maybe try pasting 'apachectl -S' output (assuming it's apache web server).
    Is a apache web server
    Where I paste the 'apachectl -S' output?
     
  4. Jesse Norell

    Jesse Norell Well-Known Member

    Here in this thread.

    [edit]: I removed my comment about .err files, I had this thread mixed up with another issue
     
  5. Taleman

    Taleman Member

    As root write in command window
    apachectl -S
    The output may be too long to cut and paste. You can direct the output to a file, for example for copying to this thread or maybe send it to pastebin (for example paste.ubuntu.com ). Directing to a file is done like this:
    apachectl -S > /tmp/listing.txt
     
  6. azuritetechs

    azuritetechs New Member

    Thanks Taleman
     
  7. azuritetechs

    azuritetechs New Member

  8. Jesse Norell

    Jesse Norell Well-Known Member

    In testing a few of your vhosts, things set to the ip (ie. 13.93.105.90:80) seems to send a short html document with an empty body and a meta redirect:
    Code:
    <meta http-equiv="refresh" content="0; url=http://www.azuritetechs.com/" />
    I don't believe that's any ISPconfig redirect behavior, which should always use a Location: header (though I could be wrong on that); it's more reminiscent of a simplistic/broken redirect behavior of "if http host != www.azuritetechs.com then redirect there", eg. applied server-wide.

    www.azuritetechs.com is set to '*', not the ip, and returns a wordpress-generated html page

    azuritetechs.com returns a 500 Internal Server Error

    I'd examine /etc/apache2/sites-enabled/000-default.conf to see if it's doing some funky redirecting, and try 'grep -Rl azuritetechs.com /etc/apache2' to find others.
     
  9. azuritetechs

    azuritetechs New Member

    This is the content of /etc/apache2/sites-enabled/000-default.conf
    http://paste.ubuntu.com/24923686/

    And this is the output from the 'grep -Rl azuritetechs.com /etc/apache2'. Do you need the content of the files?
    http://paste.ubuntu.com/24923693/


    Thanks
     
  10. Jesse Norell

    Jesse Norell Well-Known Member

    Yes, probably from conf-enabled and sites-enabled
     
  11. azuritetechs

    azuritetechs New Member

    The problem is solved by itself.
    I do not know how it has been resolved.
     

Share This Page