0
votes

I can't start apache2 with error "Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details."

So, when i check "systemctl status apache2.service"

I check : apache2ctl configtest

have error : "mkdir: cannot create directory '/var/run/apache2': Permission denied chown: changing ownership of '/var/lock/apache2.G6bcI3GyMQ': Operation not permitted " Please help me

1
Check the apache2 process privilege. You may check by starting with sudo. - J L P J
i seen it, so it not fix success - AppleFree
when systemctl status apache2.service then /etc/init.d/apache2: 57: .: Can't open /etc/apache2/envvars - AppleFree

1 Answers

0
votes

Things to check

  • do you have another apache instance running?

ps aux | grep apache2

to check if you have and

pkill -9 apache

and start apache again.

if not check with ...

ls -l /var/lock/apache2.26wFR2Eely

the username and group of the file. The username and group need to match what you set apache up with. If not remove this file and start apache again.

sources: https://askubuntu.com/questions/872162/couldnt-start-apache2-server https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/129920