0

Apache2 is always writing startup information into the error log. See the following output:

[Fri Aug 26 12:57:54.298895 2016] [ssl:warn] [pid 4287] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Aug 26 12:57:54.326885 2016] [mpm_prefork:notice] [pid 4287] AH00163: Apache/2.4.10 (Linux/SUSE) OpenSSL/1.0.1k-fips PHP/5.6.1 configured -- resuming normal operations
[Fri Aug 26 12:57:54.326943 2016] [core:notice] [pid 4287] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D CACTI -D SYSTEMD -D FOREGROUND'

How can I configure apache2 to stop that as it is confusing webmin which thinks that although it started successfully, it did not..

I do not have a setting in any configuration file that says

LogLevel debug|trace

3 Answers 3

0

You can stop these being logged by setting the appropriate log level globally or on a per module basis. https://httpd.apache.org/docs/current/mod/core.html#loglevel

So if the general or core log level is lower than "notice" you will not get the third log line. If the general or mpm_prefork log level is lower than notice then you wont get the second line. If the general or ssl log level is lower than warn you wont get the first line.

Alternatively you could use a piped log and filter them out: http://httpd.apache.org/docs/current/logs.html#piped

However it's webmin that really needs fixing as these are perfectly normal log entries. I would log a defect with the webmin people.

1
  • That is what I fear too, that webmin has to ignore the default output of the startup. I find it very uncomfortable however, to have that output in the error stream..
    – Isidius
    Aug 26, 2016 at 12:27
0

The default LogLevel in Apache 2.4 is warn (and I would suggest keeping this). Your Apache configuration must has this changed somewhere to notice since it’s displaying that level of message verbosity. You should remove this setting so the default level of warn is used.

I’d also suggest resolving the Init: Session Cache is not configured warning.

1
  • I have done a grep on all the configuration files and could not find a setting with "LogLevel" other than error or warn :-(
    – Isidius
    Aug 26, 2016 at 12:26
0

To get rid of the error messages follow the steps here.

To see less of the logging, you can edit this line in your httpd.conf file LogLevel warn to LogLevel error which will log only if there is error that causing the server to malfunction.

If you only want to get rid of the first message, then you can disable the SSL module if you don't need it by commenting the line LoadModule ssl_module in your httpd.conf file. Or by configuring the SSLSessionCache correctly. Detailed instructions are found here.

If the following error is encountered in the error.log file:

[warn] Init: Session Cache is not configured [hint: SSLSessionCache]

This usually points to a distro breaking up SSL directives from the base SSL virtual host configuration. The default SSL configuration shipped with apache.org's Apache package contains these SSL configurations along with a base virtual host configuration.

Make sure that your SSL configuration file gets loaded before your virtual host configuration file and contains a line that looks like:

SSLSessionCache shmcb:/some/example/path/ssl_scache(512000)

Note: for it to work you need to install and enable socache_shmcb_module.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .