Apache2 not writing to var/log/apache2/access.log [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
JNeuhoff
Level 1
Level 1
Posts: 4
Joined: Tue May 17, 2022 11:35 am

Apache2 not writing to var/log/apache2/access.log [SOLVED]

Post by JNeuhoff »

Running the Apache2 server on a Linux Mint 20.3 xfce with Kernel 5.13.0-52-generic (x86_64), the Apache2 server logs no client requests in the var/log/apache2/access.log, even though logging is enabled in the etc/apache2/sites-enabled/000-default.conf:

Code: Select all

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
How can I enable the access.log?

It's all running on a local test server at localhost.
Last edited by JNeuhoff on Thu Jul 07, 2022 6:44 am, edited 1 time in total.
JNeuhoff
Level 1
Level 1
Posts: 4
Joined: Tue May 17, 2022 11:35 am

Re: Apache2 not writing to var/log/apache2/access.log [SOLVED]

Post by JNeuhoff »

OK, I think I found out why this happens. I installed an SSL based on openssl, and that causes it to log all secure requests to the var/log/apache2/other_vhosts_access.log .

I'll mark this thread as solved.
Locked

Return to “Software & Applications”