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!
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
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 command nano, which suggests that somehow the command to open the nano text editor got included in the configuration file itself.
sudo nano /home/admin/conf/web/essayszone.com.apache2.ssl.conf
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 press Enter to save.Run Configtest Again After making the changes, run the configtest again to see if there are any more issues:
sudo apache2ctl configtest
If it returns Syntax OK, you can proceed to restart Apache.
sudo systemctl restart apache2
If Apache fails to start, please check the error message and adjust the configuration file as needed.
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.
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.