I followed the letsencrypt instructions exactly, but it didn't work, so I did a certbot delete once, but when I restarted Apache, I got the following error and it didn't work.
What is the best way to reconfigure it?
Apr 06 19:13:03 wordpress-3-vm apachectl[28038]: AH00526: Syntax error on line 34 of /etc/apache2/sites-enabled/000-default-le-ssl.conf:
Apr 06 19:13:03 wordpress-3-vm apachectl[28038]: SSLCertificateFile: file '/etc/letsencrypt/live/test.xxxxxxxxxxx.co.jp/fullchain.pem' does not exist or is empty
Apr 06 19:13:03 wordpress-3-vm apachectl[28038]: Action 'start' failed.
Apr 06 19:13:03 wordpress-3-vm apachectl[28038]: The Apache error log may have more information.
Apr 06 19:13:03 wordpress-3-vm systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 19:13:03 wordpress-3-vm systemd[1]: Failed to start The Apache HTTP Server.
Hi @nobu,
You should delete /etc/apache2/sites-enabled/000-default-le-ssl.conf
and then restart Apache.
Thank you very much.
I tried deleting /etc/apache2/sites-enabled/000-default-le-ssl.conf and running it.
It changed to the following error, does that mean there is some file missing?
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-04-06 20:13:53 UTC; 24s ago
Process: 28668 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 28676 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 28511 (code=exited, status=0/SUCCESS)
Apr 06 20:13:53 wordpress-3-vm systemd[1]: Starting The Apache HTTP Server...
Apr 06 20:13:53 wordpress-3-vm apachectl[28676]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Could not open configuration file
Apr 06 20:13:53 wordpress-3-vm apachectl[28676]: Action 'start' failed.
Apr 06 20:13:53 wordpress-3-vm apachectl[28676]: The Apache error log may have more information.
Apr 06 20:13:53 wordpress-3-vm systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 20:13:53 wordpress-3-vm systemd[1]: Failed to start The Apache HTTP Server.
Apr 06 20:13:53 wordpress-3-vm systemd[1]: apache2.service: Unit entered failed state.
Apr 06 20:13:53 wordpress-3-vm systemd[1]: apache2.service: Failed with result 'exit-code'.
You're running the restart command as root, right?
What's on line 225 of /etc/apache2/apache2.conf
? What does the log in /var/log/apache2
say?
The error log will be as follows.
[Tue Apr 06 19:58:45.678903 2021] [mpm_prefork:notice] [pid 28511] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u configured -- resuming normal operations
[Tue Apr 06 19:58:45.678987 2021] [core:notice] [pid 28511] AH00094: Command line: '/usr/sbin/apache2'
[Tue Apr 06 20:13:53.095701 2021] [mpm_prefork:notice] [pid 28511] AH00169: caught SIGTERM, shutting down
How about the contents of this configuration file?
Line 225, which is as follows.
Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
It is true that if I commented this line 225, Apache worked, but the wordpress service did not work.
Are there other files still present in /etc/apache2/sites-enabled
?
The file was still there.
After deleting the file, I checked the site and it worked fine.
Thank you very much for your help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.