dragonSam
By:
dragonSam

Unable to add SSL certificate using Let's Encrypt.

July 26, 2017 1.3k views
Apache Firewall Let's Encrypt Security Ubuntu 16.04

Hi @all,

I was following this tutorial to install SSL on my droplet.
How To Secure Apache with Let's Encrypt on Ubuntu 16.04

But for some reason I am getting this error:
Failed authorization procedure. topladylingerie.co.ke (tls-sni-01): urn:acme:err or:connection :: The server could not connect to the client to verify the domain :: Connection refused, www.topladylingerie.co.ke (tls-sni-01): urn:acme:error:c onnection :: The server could not connect to the client to verify the domain :: Connection refused
IMPORTANT NOTES:
The following errors were reported by the server:
Domain: topladylingerie.co.ke
Type: connection
Detail: Connection refused

Domain: www.topladylingerie.co.ke
Type: connection
Detail: Connection refused

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.

And I have checked the firewall status, here is the ufw status:
Status: active
To Action From
Apache Full ALLOW Anywhere
OpenSSH ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)

I am doing this first time and had googled but no result. and event tried the cases on tutorial page. still error persists...

Can anyone help?

7 Answers

Hi @dragonSam

Can you run this command:

sudo lsof -iTCP -sTCP:LISTEN -P
  • I ran this command and this is the output:
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    systemd-r 1652 systemd-resolve 16u IPv4 16516 0t0 TCP localhost:53 (LISTEN)
    systemd-r 1652 systemd-resolve 17u IPv4 16517 0t0 TCP *:5355 (LISTEN)
    systemd-r 1652 systemd-resolve 18u IPv6 16518 0t0 TCP *:5355 (LISTEN)
    mysqld 1687 mysql 35u IPv4 19599 0t0 TCP localhost:3306 (LISTEN)
    dovecot 1725 root 15u IPv4 16992 0t0 TCP localhost:4190 (LISTEN)
    dovecot 1725 root 26u IPv4 17000 0t0 TCP *:110 (LISTEN)
    dovecot 1725 root 27u IPv6 17001 0t0 TCP *:110 (LISTEN)
    dovecot 1725 root 28u IPv4 17002 0t0 TCP *:995 (LISTEN)
    dovecot 1725 root 29u IPv6 17003 0t0 TCP *:995 (LISTEN)
    dovecot 1725 root 33u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    dovecot 1725 root 43u IPv4 17025 0t0 TCP *:143 (LISTEN)
    dovecot 1725 root 44u IPv6 17026 0t0 TCP *:143 (LISTEN)
    dovecot 1725 root 45u IPv4 17027 0t0 TCP *:993 (LISTEN)
    dovecot 1725 root 46u IPv6 17028 0t0 TCP *:993 (LISTEN)
    lmtp 1728 vmail 9u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    lmtp 1747 vmail 9u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    lmtp 1748 vmail 9u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    lmtp 1749 vmail 9u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    lmtp 1750 vmail 9u IPv4 17015 0t0 TCP localhost:24 (LISTEN)
    sshd 1751 root 3u IPv4 18726 0t0 TCP *:22 (LISTEN)
    sshd 1751 root 4u IPv6 18729 0t0 TCP *:22 (LISTEN)
    python 1998 iredapd 3u IPv4 19606 0t0 TCP localhost:7777 (LISTEN)
    master 2105 root 13u IPv4 19962 0t0 TCP *:25 (LISTEN)
    master 2105 root 14u IPv6 19963 0t0 TCP *:25 (LISTEN)
    master 2105 root 116u IPv4 20072 0t0 TCP *:587 (LISTEN)
    master 2105 root 117u IPv6 20073 0t0 TCP *:587 (LISTEN)
    master 2105 root 126u IPv4 20083 0t0 TCP localhost:10025 (LISTEN)
    /usr/sbin 2216 amavis 5u IPv4 20959 0t0 TCP localhost:10024 (LISTEN)
    /usr/sbin 2216 amavis 6u IPv4 20960 0t0 TCP localhost:10026 (LISTEN)
    /usr/sbin 2216 amavis 7u IPv4 20961 0t0 TCP localhost:9998 (LISTEN)
    /usr/sbin 2265 amavis 5u IPv4 20959 0t0 TCP localhost:10024 (LISTEN)
    /usr/sbin 2265 amavis 6u IPv4 20960 0t0 TCP localhost:10026 (LISTEN)
    /usr/sbin 2265 amavis 7u IPv4 20961 0t0 TCP localhost:9998 (LISTEN)
    apache2 2810 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 5192 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 6602 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 6603 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 10097 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 15316 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 19717 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 24990 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 24991 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 28218 root 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)
    apache2 28223 www-data 9u IPv4 3274799 0t0 TCP ubuntu-1gb-nyc3-01:80 (LISTEN)

    • @dragonSam

      Wow, you're running a lot of processes - in several different services - but none of them are listening to the HTTPS port 443

      Normally Let's Encrypt just works "out of the box", but maybe your configuration is a little different, so the automatic generation doesn't work.
      Let's see which configurations your Apache has enabled, by running this:

      sudo apache2ctl -S
      

      Please use the </> button in the comment editor to keep the formatting.

      • Here it is:

        *:80                   www.topladylingerie.co.ke (/etc/apache2/sites-enabled/000-default.conf:1)
        ServerRoot: "/etc/apache2"
        Main DocumentRoot: "/var/www/html"
        Main ErrorLog: "/var/log/apache2/error.log"
        Mutex watchdog-callback: using_defaults
        Mutex rewrite-map: using_defaults
        Mutex default: dir="/var/lock/apache2" mechanism=fcntl
        Mutex mpm-accept: using_defaults
        PidFile: "/var/run/apache2/apache2.pid"
        Define: DUMP_VHOSTS
        Define: DUMP_RUN_CFG
        User: name="www-data" id=33
        Group: name="www-data" id=33
        
        
        • @dragonSam

          Did you setup this droplet manually?
          If yes, why did you install a mail server too?
          If no, which One-Click image did you use and why that image?

          Can you post this configuration file:

          /etc/apache2/sites-enabled/000-default.conf
          
          • Yes i had following the steps of creating a droplet, and then used tutorial to install LAMP

            Afterward i tried to install a mail server too here, which was really a bad idea. I think the mail server files were not removed completely as you came to know about it.

            and @hansen is it safe to provide contents of file??

            A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is...
      • @hansen

        i had already added 443 port in my firewall, but still it is not there are you said, then how can i add 443 port for listening?

        • @dragonSam
          You need follow the things I posted as a reply to your last comment.
          When generating the certificate, the certbot will create the HTTPS configuration based on the HTTP configuration.

@dragonSam

You might want to consider creating a snapshot of your droplet and then starting over from scratch again, since it's never good to have various services running on your server, which either is not configured correctly or is not maintained.

Uhmm, safe...yes, sort of. If your configuration is a regular OpenCart, then there's not anything special or hidden about it. But if you have "tricks" or things you don't want anyone to see, then it wouldn't be safe to post your configuration, but that would probably also be the reason why Let's Encrypt isn't working.

  • @hansen
    it seems i don't have option to setup LAMP from scratch, but would like to uninstall unwanted files.

    here is the config file

    <VirtualHost *:80>
        <Directory /var/www/html>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
        </Directory>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com
    
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
    
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
    </VirtualHost>
    
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    
    

    i would be deleting this reply after you have received it...

    • @dragonSam

      There is nothing special - at all - about that configuration, so no need to delete it.
      If you don't want something to be public, then you should use example.com instead of your domain and change everything else that is unique to you, but it will make it much harder to help you. Or you could hire someone to fix your issues.

      But change the configuration to this:

      <VirtualHost *:80>
          <Directory /var/www/html>
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Require all granted
          </Directory>
          ServerName topladylingerie.co.ke
          Alias www.topladylingerie.co.ke
          DocumentRoot /var/www/html
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
      </VirtualHost>
      

      Then you run the Apache configuration test and restart:

      sudo apachectl configtest
      sudo apachectl graceful
      

      And then you run Let's Encrypt again:

      sudo certbot --apache -d topladylingerie.co.ke -d www.topladylingerie.co.ke
      

@hansen
still received the same error...

  • @dragonSam

    Okay, this is really strange.
    When you run sudo apache2ctl -S is the output exactly the same as before?
    If yes, then I simply don't know what's wrong with your server configurations.

  • @dragonSam

    When you run this command:

    sudo certbot --apache -d topladylingerie.co.ke -d www.topladylingerie.co.ke
    

    Then run this command to list the last 20 lines from the error log:

    tail -20 /var/log/apache2/error.log
    

@hansen

it's almost the same result for sudo apache2ctl -S, except for first line, it has removed "www" form the domain name

*:80                   topladylingerie.co.ke (/etc/apache2/sites-enabled/000-default.conf:1)

as before it was

*:80                   www.topladylingerie.co.ke (/etc/apache2/sites-enabled/000-default.conf:1)

i think it is not to be concerned about... or is it?

And yes there are errors:

[Thu Jul 27 09:17:14.459078 2017] [mpm_prefork:notice] [pid 4797] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
[Thu Jul 27 09:17:14.664452 2017] [ssl:warn] [pid 4797] AH01906: b02af25b75d4e07e87162bfc0ec3eb9d.86d550364a53b9ef19d37e3e555280c2.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jul 27 09:17:14.664857 2017] [ssl:warn] [pid 4797] AH01906: 5741264e6db22d82f7d8bf9c5c15bf53.3faa85b9d76a169fdd5ca8298c4efee2.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jul 27 09:17:14.665055 2017] [ssl:emerg] [pid 4797] AH02572: Failed to configure at least one certificate and key for www.topladylingerie.co.ke:443
[Thu Jul 27 09:17:14.665077 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: DH PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
[Thu Jul 27 09:17:14.665088 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: EC PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
[Thu Jul 27 09:17:14.665113 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
[Thu Jul 27 09:17:14.665121 2017] [ssl:emerg] [pid 4797] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Thu Jul 27 09:17:14.665126 2017] [:emerg] [pid 4797] AH00020: Configuration Failed, exiting
[Thu Jul 27 09:17:21.162482 2017] [wsgi:warn] [pid 5963] mod_wsgi: Compiled for Python/2.7.11.
[Thu Jul 27 09:17:21.162568 2017] [wsgi:warn] [pid 5963] mod_wsgi: Runtime using Python/2.7.12+.
[Thu Jul 27 09:17:21.162643 2017] [core:warn] [pid 5963] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jul 27 09:17:21.220665 2017] [mpm_prefork:notice] [pid 5963] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
[Thu Jul 27 09:17:21.220772 2017] [core:notice] [pid 5963] AH00094: Command line: '/usr/sbin/apache2'
  • @dragonSam

    That's a lot of interesting errors, but it seems like it starts before line 20, try with 50:

    tail -50 /var/log/apache2/error.log
    
    • i thing just 50 lines would not be sufficient... kindly have a look

      [Thu Jul 27 06:35:11.109536 2017] [ssl:warn] [pid 4099] AH01906: cee1ec311ce105a55c2333892a74333b.5c7e9b7b24a6f27c086a3e0f1ae76fe0.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:35:11.111044 2017] [ssl:warn] [pid 4099] AH01906: 994c525af4f378a072627ce386b10cc7.81a5818105a66f7eed3a77c7f517db0e.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:35:11.111217 2017] [ssl:emerg] [pid 4099] AH02572: Failed to configure at least one certificate and key for www.topladylingerie.co.ke:443
      [Thu Jul 27 06:35:11.111241 2017] [ssl:emerg] [pid 4099] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: DH PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:35:11.111252 2017] [ssl:emerg] [pid 4099] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: EC PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:35:11.111269 2017] [ssl:emerg] [pid 4099] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
      [Thu Jul 27 06:35:11.111276 2017] [ssl:emerg] [pid 4099] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
      AH00016: Configuration Failed
      [Thu Jul 27 06:35:11.822041 2017] [wsgi:warn] [pid 4115] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:35:11.823130 2017] [wsgi:warn] [pid 4115] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:35:11.880737 2017] [mpm_prefork:notice] [pid 4115] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:35:11.880813 2017] [core:notice] [pid 4115] AH00094: Command line: '/usr/sbin/apache2'
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 06:35:12.605907 2017] [wsgi:alert] [pid 4116] (11)Resource temporarily unavailable: mod_wsgi (pid=4116): Couldn't create monitor thread in daemon process 'iredadmin'.
      [Thu Jul 27 06:35:12.610935 2017] [wsgi:alert] [pid 4116] (11)Resource temporarily unavailable: mod_wsgi (pid=4116): Couldn't create deadlock thread in daemon process 'iredadmin'.
      [Thu Jul 27 06:35:12.610986 2017] [wsgi:alert] [pid 4116] (11)Resource temporarily unavailable: mod_wsgi (pid=4116): Couldn't create worker thread 0 in daemon process 'iredadmin'.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 06:35:12.887884 2017] [core:notice] [pid 4115] AH00052: child pid 4117 exit signal Aborted (6)
      [Thu Jul 27 06:35:12.888224 2017] [core:notice] [pid 4115] AH00052: child pid 4118 exit signal Aborted (6)
      [Thu Jul 27 06:35:13.894566 2017] [core:notice] [pid 4115] AH00051: child pid 4119 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 06:35:13.895720 2017] [core:notice] [pid 4115] AH00051: child pid 4120 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 06:35:13.895763 2017] [core:notice] [pid 4115] AH00051: child pid 4121 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 06:36:19.086466 2017] [mpm_prefork:notice] [pid 4115] AH00171: Graceful restart requested, doing restart
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 06:36:19.902563 2017] [wsgi:warn] [pid 4115] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:36:19.902856 2017] [wsgi:warn] [pid 4115] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:36:19.904263 2017] [mpm_prefork:notice] [pid 4115] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:36:19.904284 2017] [core:notice] [pid 4115] AH00094: Command line: '/usr/sbin/apache2'
      [Thu Jul 27 06:36:22.030415 2017] [mpm_prefork:notice] [pid 4115] AH00171: Graceful restart requested, doing restart
      [Thu Jul 27 06:36:22.257458 2017] [wsgi:alert] [pid 4193] (11)Resource temporarily unavailable: mod_wsgi (pid=4193): Couldn't create reaper thread in daemon process 'iredadmin'.
      [Thu Jul 27 06:36:22.411551 2017] [wsgi:warn] [pid 4115] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:36:22.411586 2017] [wsgi:warn] [pid 4115] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:36:22.412517 2017] [mpm_prefork:notice] [pid 4115] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:36:22.412564 2017] [core:notice] [pid 4115] AH00094: Command line: '/usr/sbin/apache2'
      [Thu Jul 27 06:36:32.435379 2017] [mpm_prefork:notice] [pid 4115] AH00171: Graceful restart requested, doing restart
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      [Thu Jul 27 06:36:32.696773 2017] [ssl:warn] [pid 4115] AH01906: f80334383d31a56e5ad30e099bf3e2d9.682ad51428b3d70de140fd797f01a2a2.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:36:32.697196 2017] [ssl:warn] [pid 4115] AH01906: 119fa12a5417577e469841746b3dd8cf.75f6e93092e7d71aa00a9b967b160a59.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:36:32.697374 2017] [ssl:emerg] [pid 4115] AH02572: Failed to configure at least one certificate and key for www.topladylingerie.co.ke:443
      [Thu Jul 27 06:36:32.697399 2017] [ssl:emerg] [pid 4115] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: DH PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:36:32.697413 2017] [ssl:emerg] [pid 4115] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: EC PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:36:32.697440 2017] [ssl:emerg] [pid 4115] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
      [Thu Jul 27 06:36:32.697450 2017] [ssl:emerg] [pid 4115] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
      [Thu Jul 27 06:36:32.697458 2017] [:emerg] [pid 4115] AH00020: Configuration Failed, exiting
      [Thu Jul 27 06:36:39.115909 2017] [wsgi:warn] [pid 4309] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:36:39.115958 2017] [wsgi:warn] [pid 4309] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:36:39.115998 2017] [core:warn] [pid 4309] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
      [Thu Jul 27 06:36:39.128270 2017] [mpm_prefork:notice] [pid 4309] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:36:39.128322 2017] [core:notice] [pid 4309] AH00094: Command line: '/usr/sbin/apache2'
      [Thu Jul 27 06:42:24.086677 2017] [mpm_prefork:notice] [pid 4309] AH00171: Graceful restart requested, doing restart
      [Thu Jul 27 06:42:24.281411 2017] [wsgi:warn] [pid 4309] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:42:24.281446 2017] [wsgi:warn] [pid 4309] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:42:24.282587 2017] [mpm_prefork:notice] [pid 4309] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:42:24.282611 2017] [core:notice] [pid 4309] AH00094: Command line: '/usr/sbin/apache2'
      [Thu Jul 27 06:42:33.152314 2017] [mpm_prefork:notice] [pid 4309] AH00171: Graceful restart requested, doing restart
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      [Thu Jul 27 06:42:33.339839 2017] [ssl:warn] [pid 4309] AH01906: d52e8d738cca1d04d18b067e6eb982c5.a08e1aad0459c1dcbad76a236eb78b2f.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:42:33.340291 2017] [ssl:warn] [pid 4309] AH01906: 38a621fd1f7d3d96236e8ad3e3d4affd.d65f23e0f205dd5d20c75d7e126744ca.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 06:42:33.340503 2017] [ssl:emerg] [pid 4309] AH02572: Failed to configure at least one certificate and key for www.topladylingerie.co.ke:443
      [Thu Jul 27 06:42:33.340535 2017] [ssl:emerg] [pid 4309] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: DH PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:42:33.340561 2017] [ssl:emerg] [pid 4309] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: EC PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 06:42:33.340615 2017] [ssl:emerg] [pid 4309] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
      [Thu Jul 27 06:42:33.340632 2017] [ssl:emerg] [pid 4309] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
      [Thu Jul 27 06:42:33.340642 2017] [:emerg] [pid 4309] AH00020: Configuration Failed, exiting
      [Thu Jul 27 06:42:40.019414 2017] [wsgi:warn] [pid 4797] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 06:42:40.019472 2017] [wsgi:warn] [pid 4797] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 06:42:40.019513 2017] [core:warn] [pid 4797] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
      [Thu Jul 27 06:42:40.054447 2017] [mpm_prefork:notice] [pid 4797] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 06:42:40.054512 2017] [core:notice] [pid 4797] AH00094: Command line: '/usr/sbin/apache2'
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 08:23:08.013781 2017] [core:notice] [pid 4797] AH00052: child pid 4803 exit signal Aborted (6)
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:22.799405 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:02:32.811390 2017] [core:notice] [pid 4797] AH00051: child pid 4799 exit signal Segmentation fault (11), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:32.818577 2017] [core:notice] [pid 4797] AH00052: child pid 4855 exit signal Aborted (6)
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:34.834919 2017] [core:notice] [pid 4797] AH00051: child pid 5292 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:34.835381 2017] [core:notice] [pid 4797] AH00051: child pid 5293 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:36.845581 2017] [core:notice] [pid 4797] AH00051: child pid 5296 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:37.887063 2017] [core:notice] [pid 4797] AH00051: child pid 5298 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:37.888024 2017] [core:notice] [pid 4797] AH00051: child pid 5299 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:39.895840 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:02:49.905712 2017] [core:notice] [pid 4797] AH00051: child pid 5305 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:50.920865 2017] [core:notice] [pid 4797] AH00051: child pid 5307 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:51.926069 2017] [core:notice] [pid 4797] AH00051: child pid 5309 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:51.927102 2017] [core:notice] [pid 4797] AH00051: child pid 5310 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:51.927141 2017] [core:notice] [pid 4797] AH00051: child pid 5311 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:02:51.927161 2017] [core:notice] [pid 4797] AH00051: child pid 5312 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:02:53.940153 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:03:03.946561 2017] [core:notice] [pid 4797] AH00051: child pid 5317 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:04.950506 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:03:14.978549 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:24.998773 2017] [core:notice] [pid 4797] AH00051: child pid 5320 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:25.000067 2017] [core:notice] [pid 4797] AH00051: child pid 5322 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:25.000122 2017] [core:notice] [pid 4797] AH00051: child pid 5323 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:26.040278 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:03:36.106072 2017] [core:notice] [pid 4797] AH00051: child pid 5326 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:36.116735 2017] [core:notice] [pid 4797] AH00051: child pid 5327 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:36.116825 2017] [core:notice] [pid 4797] AH00051: child pid 5328 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:36.116865 2017] [core:notice] [pid 4797] AH00052: child pid 5329 exit signal Aborted (6)
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:37.119891 2017] [core:notice] [pid 4797] AH00051: child pid 5334 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:37.121197 2017] [core:notice] [pid 4797] AH00051: child pid 5335 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:03:37.121236 2017] [core:notice] [pid 4797] AH00051: child pid 5336 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:39.129311 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:03:49.138767 2017] [core:notice] [pid 4797] AH00051: child pid 5340 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:03:50.143566 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:04:00.164473 2017] [core:notice] [pid 4797] AH00051: child pid 5342 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:01.173695 2017] [core:notice] [pid 4797] AH00051: child pid 5345 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:01.174864 2017] [core:notice] [pid 4797] AH00051: child pid 5346 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:01.174892 2017] [core:notice] [pid 4797] AH00051: child pid 5347 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:03.194372 2017] [core:notice] [pid 4797] AH00051: child pid 5351 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:04.198445 2017] [core:notice] [pid 4797] AH00051: child pid 5353 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:04.199588 2017] [core:notice] [pid 4797] AH00051: child pid 5354 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:06.207908 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:04:16.219806 2017] [core:notice] [pid 4797] AH00051: child pid 5357 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:17.224654 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:04:27.237417 2017] [core:notice] [pid 4797] AH00051: child pid 5359 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:28.248074 2017] [core:notice] [pid 4797] AH00051: child pid 5371 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:28.249670 2017] [core:notice] [pid 4797] AH00051: child pid 5372 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:28.249750 2017] [core:notice] [pid 4797] AH00051: child pid 5373 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:29.254748 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:41.276226 2017] [core:notice] [pid 4797] AH00051: child pid 5468 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:04:41.277888 2017] [core:notice] [pid 4797] AH00051: child pid 5469 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:43.286498 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:04:53.294402 2017] [core:notice] [pid 4797] AH00051: child pid 5472 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:04:54.305793 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:05:04.322680 2017] [core:notice] [pid 4797] AH00051: child pid 5474 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:05.332638 2017] [core:notice] [pid 4797] AH00051: child pid 5476 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:05.333550 2017] [core:notice] [pid 4797] AH00051: child pid 5477 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:05.333569 2017] [core:notice] [pid 4797] AH00051: child pid 5478 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:07.347156 2017] [core:notice] [pid 4797] AH00051: child pid 5482 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:08.351529 2017] [core:notice] [pid 4797] AH00051: child pid 5484 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:08.356300 2017] [core:notice] [pid 4797] AH00051: child pid 5485 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:10.375559 2017] [core:notice] [pid 4797] AH00051: child pid 5488 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:11.387169 2017] [core:notice] [pid 4797] AH00051: child pid 5490 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:11.388395 2017] [core:notice] [pid 4797] AH00051: child pid 5491 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:13.414421 2017] [core:notice] [pid 4797] AH00051: child pid 5494 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:14.418407 2017] [core:notice] [pid 4797] AH00051: child pid 5496 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:14.419866 2017] [core:notice] [pid 4797] AH00051: child pid 5497 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:16.439007 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:05:26.450977 2017] [core:notice] [pid 4797] AH00051: child pid 5500 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:27.462857 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:05:37.487197 2017] [core:notice] [pid 4797] AH00051: child pid 5502 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:38.502365 2017] [core:notice] [pid 4797] AH00051: child pid 5504 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:38.503262 2017] [core:notice] [pid 4797] AH00051: child pid 5505 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:38.503280 2017] [core:notice] [pid 4797] AH00051: child pid 5506 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:40.514717 2017] [core:notice] [pid 4797] AH00051: child pid 5510 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:41.520198 2017] [core:notice] [pid 4797] AH00051: child pid 5512 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:41.521398 2017] [core:notice] [pid 4797] AH00051: child pid 5513 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:43.528578 2017] [mpm_prefork:error] [pid 4797] (12)Cannot allocate memory: AH00159: fork: Unable to fork new process
      [Thu Jul 27 09:05:53.542000 2017] [core:notice] [pid 4797] AH00051: child pid 5516 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:54.560923 2017] [core:notice] [pid 4797] AH00051: child pid 5518 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:55.565054 2017] [core:notice] [pid 4797] AH00051: child pid 5520 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:55.566275 2017] [core:notice] [pid 4797] AH00051: child pid 5521 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:55.566365 2017] [core:notice] [pid 4797] AH00051: child pid 5522 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:55.566396 2017] [core:notice] [pid 4797] AH00051: child pid 5523 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:57.578540 2017] [core:notice] [pid 4797] AH00051: child pid 5528 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:05:58.582358 2017] [core:notice] [pid 4797] AH00051: child pid 5530 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:05:58.584285 2017] [core:notice] [pid 4797] AH00051: child pid 5531 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:00.598373 2017] [core:notice] [pid 4797] AH00051: child pid 5534 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:01.605557 2017] [core:notice] [pid 4797] AH00051: child pid 5536 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:06:01.606648 2017] [core:notice] [pid 4797] AH00051: child pid 5537 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:03.621682 2017] [core:notice] [pid 4797] AH00051: child pid 5540 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:04.628961 2017] [core:notice] [pid 4797] AH00051: child pid 5542 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:06:04.630677 2017] [core:notice] [pid 4797] AH00051: child pid 5543 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:06.641255 2017] [core:notice] [pid 4797] AH00051: child pid 5546 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:07.645865 2017] [core:notice] [pid 4797] AH00051: child pid 5548 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:06:07.646605 2017] [core:notice] [pid 4797] AH00051: child pid 5549 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:06:09.665340 2017] [core:notice] [pid 4797] AH00051: child pid 5552 exit signal Aborted (6), possible coredump in /etc/apache2
      [crit] Memory allocation failed, aborting process.
      [crit] Memory allocation failed, aborting process.
      [Thu Jul 27 09:09:46.284508 2017] [core:notice] [pid 4797] AH00051: child pid 5554 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:09:46.285562 2017] [core:notice] [pid 4797] AH00051: child pid 5555 exit signal Aborted (6), possible coredump in /etc/apache2
      [Thu Jul 27 09:17:14.459078 2017] [mpm_prefork:notice] [pid 4797] AH00171: Graceful restart requested, doing restart
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
      [Thu Jul 27 09:17:14.664452 2017] [ssl:warn] [pid 4797] AH01906: b02af25b75d4e07e87162bfc0ec3eb9d.86d550364a53b9ef19d37e3e555280c2.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 09:17:14.664857 2017] [ssl:warn] [pid 4797] AH01906: 5741264e6db22d82f7d8bf9c5c15bf53.3faa85b9d76a169fdd5ca8298c4efee2.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
      [Thu Jul 27 09:17:14.665055 2017] [ssl:emerg] [pid 4797] AH02572: Failed to configure at least one certificate and key for www.topladylingerie.co.ke:443
      [Thu Jul 27 09:17:14.665077 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: DH PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 09:17:14.665088 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: EC PARAMETERS) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
      [Thu Jul 27 09:17:14.665113 2017] [ssl:emerg] [pid 4797] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
      [Thu Jul 27 09:17:14.665121 2017] [ssl:emerg] [pid 4797] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
      [Thu Jul 27 09:17:14.665126 2017] [:emerg] [pid 4797] AH00020: Configuration Failed, exiting
      [Thu Jul 27 09:17:21.162482 2017] [wsgi:warn] [pid 5963] mod_wsgi: Compiled for Python/2.7.11.
      [Thu Jul 27 09:17:21.162568 2017] [wsgi:warn] [pid 5963] mod_wsgi: Runtime using Python/2.7.12+.
      [Thu Jul 27 09:17:21.162643 2017] [core:warn] [pid 5963] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
      [Thu Jul 27 09:17:21.220665 2017] [mpm_prefork:notice] [pid 5963] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12+ configured -- resuming normal operations
      [Thu Jul 27 09:17:21.220772 2017] [core:notice] [pid 5963] AH00094: Command line: '/usr/sbin/apache2'
      
      

@dragonSam

Bam! There it was:

[crit] Memory allocation failed, aborting process.

You're running out of RAM on the server, which is why it was misbehaving in a very strange way.
This is because you installed a lot of services to run a mail server. There's not quite enough resources on a 1GB droplet to sustain so many services.

You need to reinstall the entire droplet or uninstall every single service you don't use.
Since I don't know which tutorial you followed to install the mail server, then I don't know which services to uninstall.

  • I had used this tutorial to install mail server too. When i wanted to install mail server on my droplet some tutorials said to make on a fresh droplet, and some said you install on server where site is hosted. So i tried and here it is....

    I will try to uninstall such service, and of course, if you can suggest anything related to this.

    • @dragonSam

      I'm not sure which services you installed, since it's a wizard.
      Can you post this file: /var/log/apt/history.log
      The file contains every package installed recently.
      You can run apt-get remove package-name to uninstall them.

@hansen

these are the commands which I had found in history.log file

apt-get install -y dialog

and

apt-get install -y postfix postfix-pcre mysql-client mysql-server postfix-mysql libdbd-mysql-perl libaprutil1-dbd-mysql php-json php-gd php-mcrypt php-curl mcrypt php-intl php-xml php-mbstring php-mysql apache2 apache2-utils libapache2-mod-php dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-sieve dovecot-mysql amavisd-new libcrypt-openssl-rsa-perl libmail-dkim-perl clamav-freshclam clamav-daemon spamassassin altermime arj zoo nomarch cpio lzop cabextract p7zip rpm ripole libmail-spf-perl unrar-free pax python-sqlalchemy python-dnspython python-mysqldb python-pymysql python-jinja2 python-netifaces python-webpy python-beautifulsoup python-lxml python-pycurl libapache2-mod-wsgi python-bcrypt awstats fail2ban bzip2 acl patch cron tofrodos logwatch unzip bsdutils liblz4-tool

I think the former command was the result of the sudo bash iRedMail.sh command which I used from the tutorial Not sure but these are the commands shown there.

  • @dragonSam

    Okay, there's so much installed with that iRedMail wizard, so you can take a snapshot of the droplet in case it goes wrong and then uninstall and reboot:

    sudo apt-get remove postfix dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-sieve dovecot-mysql amavisd-new clamav-freshclam clamav-daemon spamassassin altermime awstats
    
    sudo reboot
    

@hansen

Finally was able to install certificates. Had removed mail server related processes which were running previously and this issue is also reported in github. Referred this too: Certbot fails to get certificates under Ubuntu 16.04

thank you for your help and time, really appreciate it.

Have another answer? Share your knowledge.