How to disable access_log

Hi all!

I need to disable the ‘access_log’ that generates Virtualmin in ‘/var/log/virtualmin/’ because I use Google Analytics. I commented the lines that have ‘access_log’ from the crontab, for example:

21 0 * * * /etc/webmin/webalizer/ /var/log/virtualmin/{VIRTUAL_SERVER}_access_log

Is that correct? Thanks and regards!

PD: Sorry for my Spanglish


If you don’t wish to use Webalizer any longer, you can go into Edit Virtual Server -> Enabled Features, and on there you can disable the “Webalizer reporting” feature.


Thank you very much for your answer!

Could you confirm that doing what you say:

/var/log/virtualmin/{VIRTUALSERVER}_access_log > Is disabled?
/var/log/virtualmin/{VIRTUALSERVER}_error_log > Is activated?

Thank you again!

All the above does is disable Webalizer’s use of those logs. It doesn’t disable the logging itself.

I wouldn’t really recommend disabling the logging as a whole… but if you really want to do that, you’d need to edit the Apache config to do so – you could edit the sections for the Virtual Hosts in question, and then remove the part that defines the access logging.


Can anyone help me?

Thank you very much Eric!

I disable access log from apache: ‘/etc/apache2/apache2.conf’ > Comment line ‘CustomLog’

And I did what you said: ‘Edit Virtual Server’ > ‘Enabled Features’ > Disable ‘Webalizer reporting’ > Restart Apache.

But Virtualmin still creates the file ‘/var/log/virtualmin/access_log’. What can I do?


I again don’t recommend what you’re trying to do :slight_smile:

But Virtualmin doesn’t create the log files, Apache does.

And if Apache is still creating the log files, that means Apache is still configured to perform logging.

To perform what you’re trying to do, which I don’t recommend, you’d have to remove the CustomLog entry for each of your VirtualHosts, not just the main one in the apache2.conf file.


Thanks again for your response Eric. I understand, but I have no choice.

I did what you suggest. In one virtual server works fine, but in an other file is still created.

staging.example.com_error_log> OK!

example.com_ssl_access_log> Keep coming

example_access_log> Keep coming

Both virtual servers have the following configurations equal:








I await your response. Greetings!

Is there anything in the access log?

Or is it blank?

If you still see data in it, then it sounds like it’s not completely removed from the Apache config.

If it’s blank, that probably just the log rotation at work.

There may not be a simple way to prevent the log rotation process from creating a blank file.

You’d need to manually remove it from the log rotation config files each time you create a domain, but Virtualmin is likely to complain about that and generate errors. Sorry, but the setup really isn’t designed to be done without logging…


Thanks! I’m still seeing data in the access log.

What I did? I commented all lines (with #) where appear ‘CustomLog’ in /etc/httpd/conf/httpd.conf

I have CentOS 5.5 and Apache 2.2.3. I need to do something else?

Sorry for dropping in on your thread but why do you want/need to disable the access log?

I have both Google Analytics and Webalizer/access log running at the same time on several virtual servers with out any problems. Is there some problem you are having?

I want to disable it because the file size is over 1GB, and the hard disk is too small…

Someone who can help me? Eric?