Big trouble: separate domain appears as ServerAlias for another domain

Discussion in 'General' started by Dmitry, Jul 17, 2006.

  1. Dmitry

    Dmitry New Member

    Seems like my ISPConfig database is corrupt :( Here is my trouble.

    I have several domains. Let's say, domain1.com, domain2.com and domain3.com. They all are configured identical: have several users, one database and server alias without www.

    Yesterday I found that domain1's alias includes "domain2.com". I.e. it looks like this on "Co-domains" tab:

    111.222.333.444 domain1.com
    111.222.333.444 domain2.com

    Remeber, domain2 is separate domain and site!

    I clicked on the IP address (it is a link), though I can delete it. I got a user (!) record for domain2. Not domain record but user record!

    After several passes I managed to remove domain2.com from co-domains list of domain1.com. I had to delete domain2 completely and recreate it. It did not appear in the co-domains for domain1.

    Today I added users to domain2. Then I looked to Apache files, just to check how they were regenerated and... found domain2.com as ServerAlias for domain1.com. I went to check co-domains for domain1.com in ISPConfig and found domain2.com there again. Now if I click on it, it gives me database (!) record for domain3 (it gave user record for domain2 before)!

    Looks like my ISPConfig database is broken. :( I have to manually remove domain2.com from ServerAlias each timewhen I do anything in ISPConfig.

    ISPConfig version is 3.2.3, running on SuSE 10.0 64-bit. Mysql 4.1.

    Does anyone have idea how can I repair ISPConfig in my case?

    Thanks in advance!
     
    Last edited: Jul 17, 2006
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Your database seems to be really messed up. Did you delet any records manually in the datbase any time before the corruption happened?
     
  3. Dmitry

    Dmitry New Member

    No, I did not :(

    The worst thing is that I even cannot imagine how it could went so wrong. There were no crashes, interruptions, errors or anything abnormal.
     
  4. Dmitry

    Dmitry New Member

    If anyone can help, I would be happy :( I like IspConfig and really do not want to change it to anything else because of this error... But if it is unrecoverable, I have to find another hosting management panel.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Dmitry,

    I'am not sure if changing the controlpanel will help you to avoid database corruption in general. From the last ISPConfig release we had more then 18.000 downloads and this is the first time that this kind of corruption has been reported so it is very uncommon.

    How many websites do you have in your ISPConfig installation now?
     
  6. Dmitry

    Dmitry New Member

    I have 12 sites.

    Usually I am able to handle these kind of errors inside database/software (I am working with php/mysql since 1996). But IspConfig uses complex tree logic, I will not be able to "crack" it quickly. Since I do not understand logic I can not touch database. This is why I asked for help. If I could manage it myself, I would not bother others :) But I really need help.

    I do not blame IspConfig code at all, I just need to fix the problem. As to changing hosting panel - this is my last option, only possible if I cannot fix this problem in a reasonable time.

    IspConfig is really good but currently it generates ServerAlias in a such way that shows one site instead of another. I already changed this manually five times today in apache files...
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please have a look at the developer forum, there are several posts that explain the table logic. The tables are generally connected this way:

    permissions are stored in isp_nodes for the websites, co-domains and users.

    example:

    isp_isp_web is connected to isp_nodes with the doc_id and doctype_id
    isp_isp_domain is connected to isp_nodes with the doc_id and doctype_id
    isp_isp_user is connected to isp_nodes with the doc_id and doctype_id

    Next are the relations between websites and co-domains (isp_isp_domain) and users (isp_isp_user), these relations are stored in the isp_dep table.

    Example website => co-domain relation:

    isp_isp_web.doc_id = isp_dep.parent_doc_id
    isp_isp_web.doctype_id = isp_dep.parent_doctype_id
    isp_isp_domain.doc_id = isp_dep.child_doc_id
    isp_isp_domain.doctype_id = isp_dep.child_doctype_id

    the same with users:

    isp_isp_web.doc_id = isp_dep.parent_doc_id
    isp_isp_web.doctype_id = isp_dep.parent_doctype_id
    isp_isp_user.doc_id = isp_dep.child_doc_id
    isp_isp_user.doctype_id = isp_dep.child_doctype_id

    I hope this helps a bit.
     
  8. Dmitry

    Dmitry New Member

    Thanks a lot! I will try to trace records for that domain :)
     

Share This Page