In this example the ssl module is not enabled, so the SSLEngine directive generates an error when the configuration is tested. The Apache error log may have more information. Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration You should receive output like the following:Įxample Error OutputAH00526: Syntax error on line 232 of /etc/apache2/nf: Using this option will help restrict the volume of log entries that you need to examine when checking for errors. The -since today flag will limit the output of the command to log entries beginning at 00:00:00 of the current day only. sudo journalctl -u rvice -since today -no-pager.On Ubuntu and Debian systems use the following command to examine the logs: ![]() journalctl displays logs from systemd that describe the Apache service itself, from startup to shutdown, along with any process errors that may be encountered along the way. These logs are separate from Apache’s request and error logs. The systemd logs for Apache will usually indicate whether there is a problem with starting or managing the Apache process. To inspect the systemd logs for Apache, you can use the journalctl command. If there is a problem with your Apache process or configuration you can troubleshoot it further using the journalctl command. You should receive output like this:Įxample Error OutputActive: failed (Result: exit-code) since Tue 20:01:29 UTC 1s ago The -no-pager flag will make sure that output will go directly to your terminal without requiring any interaction on your part to view it. The -l flag will ensure that output is not truncated or ellipsized. ![]() sudo systemctl status rvice -l -no-pager.The following systemctl commands will query systemd for the state of Apache’s processes. ![]() To troubleshoot common Apache errors using the systemd service manager, the first step is to inspect the state of the Apache processes on your system. Be sure to use the correct name for your Linux distribution. Apart from the differences between the service and running process names, starting, stopping, and checking Apache’s status, as well as logs with journalctl should work the same on any Linux system that uses systemd to manage the Apache service. Note: On Debian and Ubuntu systems, the Apache service and process name is apache2, whereas on CentOS, Fedora, and other RedHat-derived systems, Apache’s service and process name is httpd.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |