Accidentally deleted the main website

Discussion in 'Installation/Configuration' started by Linearconcepts, Sep 19, 2018.

  1. Linearconcepts

    Linearconcepts New Member

    Ispconfig 3, Perfect Server, Ubuntu 16.04, Apache.

    I host about 8 sites and was cleaning out some old websires. I accidentally deleted the main website (the site used to admin the server), and now none of the websites work - including the admin site. If I look in /var/www, I see the admin site (as well as the sites I want to keep. The sites I do want to delete are not there).
    I think email is still working (I get the expected response if I "telnet [site3.com] 25")

    Is there a way to recreate the main website from the command line so I can get back to using the Web interface to admin the server?

    Thanks.
     
  2. Linearconcepts

    Linearconcepts New Member

    Btw... in the past, I'd been able to access the admin site by going to www. [AnyHostedSite].com:8080, but that's not working now.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is restoring from backups out of the question?
     
  4. Linearconcepts

    Linearconcepts New Member

    This is a beta server, so backups are quite old. My fear is that trying to take anything from backups will produce conflicts with versions of other files and whatnot, and be more trouble than its worth.

    I'm hoping that fixing it will be easier than rebuilding it from scratch.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    What exactly do you mean with main domain, ISPConfig itself?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you know exactly what files were removed, you could copy them from another ISPConfig installation. You could install the same version of ISPConfig somewhere else and copy the files.
     
  7. Linearconcepts

    Linearconcepts New Member

    The hostname - f of the server is ub21.(MyOwnDomain).com. (sorta)

    In trying to create a Let's Encrypt certificate for the admin portal website (https://ub21.mod.com:8080), I used ISPCinfig to create a Website by the same name. For reasons I don't remember, it didn't create the LetsEncrypt certificate. So the other day, I thought I'd use ISPConfig to delete the Website (as well as some other expired domains) and try again.
    ISPCONFIG happily deleted the other 2 Websites without any problem. But when I deleted ub21.MODomain.com, it timed out.
    The server is now no longer capable of serving up any websites. Not the ISPConfig Pages, not the Roundcube pages, nothing. But it still sends and receives emails (pop / smtp) for the domains that it handles emails for.

    I guess another thing that's bothering me, is that I have another developmental virtual server running pretty much an identical configuration. It has no clients and no websites, yet the admin portal works just fine. So I have no idea what happened to the other server, and have no idea how to fix it.

    I haven't rebooted the server yet.
     
  8. Linearconcepts

    Linearconcepts New Member

    I found the problem!
    Sorry - but I'm still much of a newbie on these things.

    In trying to get a LetsEncrypt certificate, I deleted one site, but saw that the sitename folder was still in /etc/letsencrypt/live. So I renamed the sitenamefolder, and apparently that did it. When I went to delete the main site, apache wouldn't start up. I thought ISPConfig killed it in some way, and it never dawned on me to go to the CLI and type "service apache2 restart". Had I done that earlier, I would have seen:
    ---------
    Sep 20 12:16:01 ub21.(TheDomain).com apache2[11516]: AH00526: Syntax error on line 63 of /etc/apache2/sites-enabled/000-ispconfig.vhost:
    Sep 20 12:16:01 ub21.TheDomain.com apache2[11516]: SSLCertificateFile: file '/usr/local/ispconfig/interface/ssl/ispserver.crt' does not exis
    Sep 20 12:16:01 ub21.TheDomain.com apache2[11516]: Action 'configtest' failed.
    ---------

    There's a link in /usr/local/ispconfig/interface/ssl that points to the folder I renamed to .bak.
    So I renamed it back to its proper name, restarted Apache ..voila!

    Now I just need to proceed a little slower with trying to set up the LetsEncrypt certificate for the admin pages.

    (Then from there, I need to figure out why Outlook is requiring me to confirm unsigned certs. *sigh*)

    Thanks!!
     
    Taleman likes this.
  9. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Either you are still using a self-signed certificate for email, or the hostname used in outlook is not included in the server's certificate.
     
    Last edited: Sep 24, 2018

Share This Page