0

I get this error

/etc/init.d/apache2: 46: .: Can't open /etc/apache2/envvars
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See "systemctl  status apache2.service" and "journalctl  -xe" for details.
 failed!

when i run

[apachectl configtest]

it shows apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory Action 'configtest' failed. The Apache error log may have more information.

  • 2
    So does the file exist? Please check! – George Udosen Apr 21 '18 at 16:56
  • Have you removed /etc/apache2 or something similar, as it complains about multiple missing files? – vidarlo Apr 21 '18 at 17:09
  • when i ran [ systemctl status apache2.service] it shows systemd[1]: Failed to start The Apache HTTP Server. – utshomomen Apr 21 '18 at 17:25
0

apachectl told you that he can't open apache configuration file.

With help of the following command:

whoami
ls -la /etc/apache2/apache2.conf

check if file exists and file permissions.

In addition you could list and cat apache2 logs file in /var/logs/apache2

  • 1
    Both /etc/apache2/envvars and /etc/apache2/apache2.conf is missing according to the output. envvars is not typically something you change. It sounds like either a install interrupted in the middle, or a manual removal of config files. – vidarlo Apr 22 '18 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.