Apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory


#1

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: /opt/letsencrypt# ./certbot-auto renew

It produced this output:

Cert is due for renewal, auto-renewing…
Error while running apache2ctl configtest.
Action ‘configtest’ failed.
The Apache error log may have more information.

apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory

Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(“Error while running apache2ctl configtest.\nAction ‘configtest’ failed.\nThe Apache error log may have more information.\n\napache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory\n”,)
Attempting to renew cert (dgnyogco.is) from /etc/letsencrypt/renewal/dgnyogco.is.conf produced an unexpected error: The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(“Error while running apache2ctl configtest.\nAction ‘configtest’ failed.\nThe Apache error log may have more information.\n\napache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory\n”,). Skipping.

My web server is (include version): Ngnix

Its nginx installed, but it shows error message related with apache2 which is disabled

service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2018-07-31 03:34:44 UTC; 1 months 7 days ago
Docs: man:systemd-sysv-generator(8)

netstat -ntlp|grep nginx
tcp 0 0 192.227.181.141:443 0.0.0.0:* LISTEN 11873/nginx -g daem
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 11873/nginx -g daem
tcp6 0 0 :::80 :::* LISTEN 11873/nginx -g daem
root@server1:/etc/nginx/sites-enabled#

Apache is not installed

The operating system my web server runs on is (include version): Ubuntu 16

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No panel


#2

I would first try to find any reference to the apache2.conf file:
grep -Eri apache2.conf /etc/apache2
If you are even running apache…
Otherwise…
Please show the contents of folder: /etc/letsencrypt/renewal


#3

grep -Eri apache2.conf /etc/apache2
grep: /etc/apache2: No such file or directory

ll /etc/letsencrypt/renewal

dgnyogco.is.conf


#4

Got it

tried “certbot --nginx -d domainname”


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.