Hi,
I have upgraded Ubuntu 12 to 16 after completion i am unable to start Apache2, I am getting following error when i am starting apache2
“job for apache2.service failed because the control process exited with error code”
could you please solve?
Regards, Raja
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @rajviswas,
Before we can provide you with the way to solve it, we’ll need to know what the exact error is. There are a couple of ways to go about getting the exact error.
One is to try and start Apache and when it fails to check your Apache Error_log. The default installation for Apache2 on Ubuntu creates a log subdirectory: /var/log/apache2. Within this subdirectory are two log files with two distinct purposes: /var/log/apache2/access. log - records of every page served and every file loaded by the web server. The second file is the error_log providing every error generated by Apache. You can get yours there.
The second way would be again to try and restart Apache and when it fails, to run the command
journalctl -xe
It will again provide you with the experienced error.
As soon as you do, you can post it here for more information
Regards, KDSys
Hello, @rajviswas
Have you checked the Apache configuration for any syntax errors? You can do this using the following command:
apache2ctl configtest
You can also check the journal log as that will give you a better idea about what happened:
sudo journalctl -xe
You can check the Apache error log as well. The location of the log file should be:
/var/log/apache2/error.log and you can simply tail the log using:
tail -f /var/log/apache2/error.log
or tail the last 100 entries of it:
tail -n 100 /var/log/apache2/error.log
Let me know how it goes.
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.