apache stopped all of sudden and cert files deleted..

Discussion in 'Installation/Configuration' started by Vinay Samant, Jul 22, 2020.

  1. Vinay Samant

    Vinay Samant Member

    apache server stopped all of sudden.
    all sites went down
    cert files deleted for many sites..
    and not starting..

    should i reinstall ispconfig??
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    No. First, you should try to find out why the certs got deleted and if you have any backups of the files and folders that got deleted. Are these SSL certs Let's encrypt SSL certs?
     
  3. ahrasis

    ahrasis Well-Known Member

    For debian and ubuntu, using purge command instead of just using remove command, in removing letsencrypt certbot to install its latest client, may cause deletion of all letsencrypt SSL certs.

    This may be recoverable if you did perform some sort of backup for the relevant folder like one normally does during the ISPConfig update.

    Otherwise, I think you may not able to recover the certs.

    In this case, I am thinking that you have to disable all enabled websites, edit your ispconfig vhost to remove related ssl enabled lines, restart apache2, access your ispconfig admin panel via http and redo all certs.
     
  4. Vinay Samant

    Vinay Samant Member

    hii till
    thanks for being available all the time..
    they are all Let's encrypt SSL certs files.. deleted for 6 clients..
    but major issue is, /var/www/apps folder got deleted.. i dont know why.. how to recover?
     
  5. Vinay Samant

    Vinay Samant Member

    thanks man.. but my problem is /var/www/apps folder deleted..
     
  6. Vinay Samant

    Vinay Samant Member

    [Wed Jul 22 12:06:55.402027 2020] [ssl:emerg] [pid 11295] AH02572: Failed to configure at least one certificate and key for viccoestore.com:443
    [Wed Jul 22 12:06:55.402085 2020] [ssl:emerg] [pid 11295] SSL Library Error: error:0909006C:pEM routines:get_name:no start line (Expecting: DH PARAMETERS) -- Bad file contents or f$
    [Wed Jul 22 12:06:55.402091 2020] [ssl:emerg] [pid 11295] SSL Library Error: error:0909006C:pEM routines:get_name:no start line (Expecting: EC PARAMETERS) -- Bad file contents or f$
    [Wed Jul 22 12:06:55.402100 2020] [ssl:emerg] [pid 11295] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned

    this i m getting for many clients..
     
  7. Vinay Samant

    Vinay Samant Member

    is it possible to recreate SSL for all domains.. or remove them or ignore them and just start the sites??
     
  8. ahrasis

    ahrasis Well-Known Member

    As I said, you may redo all your websites' certs via ISPConfig panel. Untick and retick LE SSL should recreate new certs for the websites, if none is found, I think.

    About /var/www/apps I am not so sure what you are talking about as letsencrypt SSL certs folder for Debian or Ubuntu that I know is at /etc/letsencrypt.
     
    Vinay Samant likes this.
  9. Vinay Samant

    Vinay Samant Member

     
  10. Vinay Samant

    Vinay Samant Member

    u were perfect man! ur trick worked..
    i kept restarting apache n checking it's log.. everytime it warned me about SSL issue of one or other client. i commented all "SSLEngine on" in respective .vhost file in /etc/apache2/sites-available ... so finally managed to start apache.. and then obviously ISPStarted. Then as you mentioned, i religiously disabled all sites one by one. And then enabled them with SSL & LE on.. most of them restarted pefectly.. in 6-7 cases, new certificates has to be created.. but no hassle..

    u r just wonderful! I sincerely thank you for this.. can i buy you a coffee or bear online? plz let me know. i owe it to you..
     
  11. Vinay Samant

    Vinay Samant Member

    all this happened because... hold ur breathe.. because what u people are about to hear is total nonsense..
    i was in /var/www folder .. and i wanted to delete all files from /var/www/clients/client3/web18/web ... so i gave command "rm -R * /var/www/clients/client3/web18/web" .. plz dont ask me why i did that.. and when i was not drunk :( ... sooo this created havoc on my server.. many sites, folders etc were deleted.. this was 3 days before.. i recovered all of them from backup.. but apache was referring to some cache is suppose.. but it was not giving me any error.. today i entered php.ini settings for 1client to upgrade upload limit, and this is where apache restarted.. and all sites went down because apache was not able to start.. i was online working on a site, all clients were online and nothing was working.. and i was not able to access ISP aswell because apache was down.. this i m writing because it may help someone when they do such mistakes then where to start from..

    another thing i m wondering... is it not possible to run ISP on other webserver than apache? nginx or even node.js provides so many small servers.. so even if everything goes down ISPConfig can still be running on own private server and may help to make some configs or refer logs etc.. just a thought!

    but thank you guys for your time and support..
     
  12. ahrasis

    ahrasis Well-Known Member

    Yes. Other than apache2, nginx is also a supported web server. There are various howtoforge tutorials on how to build a perfect server with nginx as the web server.
     
  13. nhybgtvfr

    nhybgtvfr Active Member

    as @ahrasis says, ispconfig runs on apache or nginx.
    as for problems with customers sites and ispconfig being down. my advice would be run your own sites, and the ispconfig interface on their own server(s), and customer sites on different servers. this way, even a badly behaving customer site taking all ram/cpu won't affect your own sites or the ispconfig interface. isolate your server control/management systems from customer actions as much as possible.
    i realise in this case it was your own actions causing the problem, but if the client site contents you were trying to manually delete were not on management server as well, the rm -R * /path/ wouldn't have been run there, and you would still have had the management interface available to you.
    imagine if you had whmcs or similar on there as well, 3 days of invoices not being created and sent out, 3 days of no way for customers to pay invoices online...
     
  14. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    And conversely, if you had done that on a dedicated management server, your control panel would be down, but not customer sites.

    I believe he meant use apache for customer sites, and a different web server for ISPConfig control panel, on the same node. An interesting idea, maybe worth considering for other reasons, but surviving arbitrary "rm -R *" as root is probably not worth the considerable effort to do so, as run from a different directory could destroy things no matter what web servers you use. @nhybgtvfr's suggestion of using multiple servers would offer an amount of real protection from that and other reasons a server might go down, as does a good backup strategy. Mirrored servers might or might not help the "rm -R *" case, depending on how the mirroring is implemented, which server you did that on, and how quickly you realize the mistake.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, you can have a dedicated control panel server. See multiserver installation guides.
     

Share This Page