checkapache
Test the Apache configuration and remove SSL virtual hosts whose Let's Encrypt certificate is missing, then rebuild the configuration
- Command:
/go/checkapache - Category: Web server
- Required option: None
- Output:
Deleting <domain> Configurationfor each virtual host removed - Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
Apache refuses to start or reload when a virtual host points to an SSL certificate file that does not exist. /go/checkapache repairs this situation. It:
- runs the Apache configuration test
- finds the domains named in errors about Let's Encrypt certificate paths
- deletes the SSL virtual host file of each of those domains
- rebuilds the web server configuration with
conf
It works only on servers that run Apache. On an Nginx server it does nothing; use checknginx there.
Quick start
/go/checkapache
Syntax
/go/checkapache
The command takes no options or arguments. Run it as root.
Options
None. Any arguments you pass are ignored.
Output
The command prints one line for each virtual host it removes:
Deleting example.com Configuration
It prints nothing when the test finds no matching error, or when the server runs Nginx. The result of the Apache test itself is not shown. It is saved in /usr/local/goadmio/tmp/checkapache.db.
Each run also adds a line to /var/log/go/checkapache.log.
Examples
# Check and repair
/go/checkapache
# Read the result of the Apache test that the command saved
cat /usr/local/goadmio/tmp/checkapache.db
# Confirm that Apache is healthy afterwards
apachectl configtest
# Install a new certificate for a domain whose configuration was removed
/go/ssl example.com
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Nothing is printed, but Apache still fails | The error does not mention a Let's Encrypt certificate path, or the domain has no /home/<domain>/www folder. |
Run apachectl configtest and fix the error shown. |
| Nothing is printed on an Nginx server | The command only works with Apache. | Use checknginx. |
| A domain has no HTTPS after the command | Its SSL virtual host was deleted because the certificate was missing. | Install a certificate again with ssl or installssl. |
| The same domain is removed every time | The certificate keeps going missing, for example because renewal fails. | Check the domain's DNS and renew the certificate with ssl. |
| The test file cannot be written | The command was run without root. | Run it as root. |
Details
What it does, in order
- Logs the run to
/var/log/go/checkapache.log. - Reads the web server name from
/usr/local/goadmio/linux/ws.db. If it is notApache, the command stops here. - Runs
apachectl configtestand saves its output to/usr/local/goadmio/tmp/checkapache.db. - Extracts every name that follows
/live/in that output, which is the domain folder inside the Let's Encrypt certificate path, and saves the list in/usr/local/goadmio/tmp/apache.db. - For each name in the list that is a hosted domain (
/home/<domain>/wwwexists), printsDeleting <domain> Configurationand deletes its file<domain>-le-ssl.conffrom the Apache virtual host folder. Both the/etc/httpd/vbost/and the/etc/apache2/vbost/locations are cleaned. - If anything was deleted, rebuilds the configuration with
conf.
Which errors it handles
Only errors whose text contains a Let's Encrypt path such as /etc/letsencrypt/live/example.com/... are handled, typically a certificate or key file that does not exist or is empty. Other configuration errors are saved in the test file but are not fixed.
Known issues
- Any line of the test output with
/live/<name>leads to a deletion, including warnings, as long as<name>is a hosted domain. - The command removes only the SSL virtual host. It does not request a new certificate.
- The server IP and host name are read at the start but not used.
See also
| Command | Description |
|---|---|
checknginx |
Validate the Nginx configuration and remove vhosts with no site directory |
conf |
Rebuild the Apache/Nginx configuration in GoAdmio |
apache |
Convert a GoAdmio server from Nginx to Apache |
ssl |
Install an SSL certificate for a domain in GoAdmio |
checkssl |
Check if SSL certificates are installed for all domains |
reload |
Reload PHP-FPM and the active web server |