Output of systemctl status apache2.service Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.
root@essayszone:~# systemctl status apache2.service
● 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-08-14 12:05:37 UTC; 4min 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 8147 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Aug 14 12:05:37 essayszone.example.com apache2[8147]: * The apache2 configtest failed.
Aug 14 12:05:37 essayszone.example.com apache2[8147]: Output of config test was:
Aug 14 12:05:37 essayszone.example.com apache2[8147]: AH00526: Syntax error on line 1 of /home/admin/conf/web/essayszone.com.apache2.ssl.conf:
Aug 14 12:05:37 essayszone.example.com apache2[8147]: Invalid command 'nano', perhaps misspelled or defined by a module not included in the server configuration
Aug 14 12:05:37 essayszone.example.com apache2[8147]: Action 'configtest' failed.
Aug 14 12:05:37 essayszone.example.com apache2[8147]: The Apache error log may have more information.
Aug 14 12:05:37 essayszone.example.com systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 14 12:05:37 essayszone.example.com systemd[1]: Failed to start LSB: Apache2 web server.
Aug 14 12:05:37 essayszone.example.com systemd[1]: apache2.service: Unit entered failed state.
Aug 14 12:05:37 essayszone.example.com systemd[1]: apache2.service: Failed with result 'exit-code'.
root@essayszone:~#
Output of sudo apache2ctl configtest
root@essayszone:~# apache2ctl configtest
AH00526: Syntax error on line 1 of /home/admin/conf/web/essayszone.com.apache2.ssl.conf:
Invalid command 'nano', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
It seems like there is a syntax error in your Apache configuration file
/home/admin/conf/web/essayszone.com.apache2.ssl.conf
. The error specifically mentions an invalid commandnano
, which suggests that somehow the command to open the nano text editor got included in the configuration file itself.Solution
Locate and Remove the Invalid Command Check the file and look for any line that starts with
nano
and remove it or correct it. Nano is a text editor and should not be part of the configuration. Save the file after correcting it.CTRL + X
to close the editor.Y
to confirm changes, and pressEnter
to save.Run Configtest Again After making the changes, run the
configtest
again to see if there are any more issues:If it returns
Syntax OK
, you can proceed to restart Apache.If Apache fails to start, please check the error message and adjust the configuration file as needed.
Additional Tip
While editing configuration files, be cautious to only edit the necessary lines to avoid introducing syntax errors. Always run a configuration test after editing before restarting the service to ensure the syntax is correct.
Hello friend!
It looks like there exists some bad configuration syntax in /home/admin/conf/web/essayszone.com.apache2.ssl.conf. This line is the key:
Aug 14 12:05:37 essayszone.example.com apache2[8147]: Invalid command ‘nano’, perhaps misspelled or defined by a module not included in the server configuration
Look for the word “nano” where it shouldn’t be, try removing that and see if that has you in working order :)
Kind Regards, Jarland