How to disable access_log

13 posts / 0 new
Last post
#1 Fri, 02/08/2013 - 11:48
Lisandro1987

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/webalizer.pl /var/log/virtualmin/{VIRTUAL_SERVER}_access_log

Is that correct? Thanks and regards!

PD: Sorry for my Spanglish

Fri, 02/08/2013 - 13:15
andreychek

Howdy,

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.

-Eric

Wed, 02/13/2013 - 07:51
Lisandro1987

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!

Wed, 02/13/2013 - 09:02
andreychek

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.

-Eric

Tue, 02/19/2013 - 10:07
Lisandro1987

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?

Tue, 02/19/2013 - 10:04
Lisandro1987

Can anyone help me?

Tue, 02/19/2013 - 10:44
andreychek

Howdy,

I again don't recommend what you're trying to do :-)

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.

-Eric

Wed, 03/13/2013 - 10:48
Lisandro1987

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:

SuexecUserGroup

ServerName

ServerAlias

DocumentRoot

ScriptAlias

DirectoryIndex

Directory

...

...

...

I await your response. Greetings!

Wed, 03/13/2013 - 19:48
andreychek

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...

-Eric

Tue, 03/19/2013 - 09:16
Lisandro1987

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?

Tue, 03/19/2013 - 12:37
AllanIT

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?

Fri, 03/22/2013 - 08:30
Lisandro1987

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

Wed, 03/27/2013 - 09:22
Lisandro1987

Someone who can help me? Eric?

Topic locked