Score:0

Error while running apache2ctl graceful

cn flag

When I run this command: sudo certbot --apache -d example2.com -d www.example2.com

I get the following error:

Error while running apache2ctl graceful.
httpd not running, trying to start
Action 'graceful' failed.

After having search and tested several solutions I could not found anything.

My guess is that the problem comes from certbot not understanding the config files of Apache2, because in my case it's maybe a little bit complicated, I want to use a different SSL certificate for two different sites, example1.com and example2.com.

Here is the virtualhosts in my apache2.conf

<VirtualHost *:80>
    ServerName example1.com
    ServerAlias www.example1.com
    DocumentRoot /var/www/html

    <Directory /var/www/html>
        Require all granted
        # Enable .htaccess overrides if required
        AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:443>
    ServerName example1.com
    ServerAlias www.example1.com
    DocumentRoot /var/www/html

    <Directory /var/www/html>
        Require all granted
        # Enable .htaccess overrides if required
        AllowOverride All
    </Directory>

    SSLEngine on

</VirtualHost>



<VirtualHost *:80>
    ServerName example2.com
    ServerAlias www.example2.com
    DocumentRoot /var/www/html1

    <Directory /var/www/html1>
        Require all granted
        # Enable .htaccess overrides if required
        AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:443>
    ServerName example2.com
    ServerAlias www.example2.com
    DocumentRoot /var/www/html1

    <Directory /var/www/html1>
        Require all granted
        # Enable .htaccess overrides if required
        AllowOverride All
    </Directory>
</VirtualHost>

And I don't if this can help but I also have:

in sites-available folder:

example2.com-le-ssl.conf, example2.com.conf, default-ssl.conf, 000-default.conf

in sites-enabled folder:

example2.com-le-ssl.conf, example2.com.conf, default-ssl.conf, 000-default.conf

I am on Ubuntu 18.04 and I am using a vps

Thank you

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.