We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Trying to remove jpg gif png from access log in Nginx
Trying to remove jpg gif png from access log in Nginx
Hello
I am new to Vestacp and I have installed the control panel on Centos without any problems and it is looking a really nice control panel to use. I would like to forward my thanks to the developers.
I have a little problem I am trying to sort out. I am trying to remove all instances of jpg, gif, and png from my 'access logs'
I am using Centos 6.5 for my OS on a openvz vps.
This is what I have tried without any success:-
Added to the httpd.conf file:-
I noticed that the ownership of the 'access log' file is nginx so do I need to block those files using nginx? If so how can this be achieved please?
Thanks in advance for your help.
I am new to Vestacp and I have installed the control panel on Centos without any problems and it is looking a really nice control panel to use. I would like to forward my thanks to the developers.
I have a little problem I am trying to sort out. I am trying to remove all instances of jpg, gif, and png from my 'access logs'
I am using Centos 6.5 for my OS on a openvz vps.
This is what I have tried without any success:-
Added to the httpd.conf file:-
Code: Select all
SetEnvIf Request_URI ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|gz|swf|txt)$" dontlog
CustomLog logs/access_log combined env=!dontlog
Thanks in advance for your help.
Last edited by hammy on Sat May 10, 2014 4:59 pm, edited 1 time in total.
Re: Trying to remove jpg gif png from access log using SetEn
Could anyone please help me to achieve the above please. Which file do I need to edit to stop images being logged in the access logs? It works for apache but I am having trouble with the nginx setup.
Any help would be greatful thanks.
Any help would be greatful thanks.
Re: Trying to remove jpg gif png from access log in Nginx
Does anyone know how to stop images from showing/logging on the 'access logs'?
I have searched for the answer on google but I have had no luck with a solution hence me asking here? The acess logs are growing quickly as they are logging all images like jpg, gif, png etc.
I am using the latest Centos for my OS.
Any help with this would be most greatful.
I have searched for the answer on google but I have had no luck with a solution hence me asking here? The acess logs are growing quickly as they are logging all images like jpg, gif, png etc.
I am using the latest Centos for my OS.
Any help with this would be most greatful.
Re: Trying to remove jpg gif png from access log in Nginx
Just an update.
I have been looking at the logs of my cpanel hosting and they also record the image files.
On another vps I used to use I used a different control panel with debian and vlogger and I was able to remove all of the image files etc and only record the website visit in the 'access logs' maybe this could be a added feature for a later distrobution od vestacp maybe? Maybe an option to not record certain files in your 'access logs' when you get a visitor to your website.
Just a thought as it would vastly reduce the size of the access logs for busy websites.
Sorry for any inconvenience caused this thread can be classed as resolved and closed.
Thank you for making vestacp it is great :)
I have been looking at the logs of my cpanel hosting and they also record the image files.
On another vps I used to use I used a different control panel with debian and vlogger and I was able to remove all of the image files etc and only record the website visit in the 'access logs' maybe this could be a added feature for a later distrobution od vestacp maybe? Maybe an option to not record certain files in your 'access logs' when you get a visitor to your website.
Just a thought as it would vastly reduce the size of the access logs for busy websites.
Sorry for any inconvenience caused this thread can be classed as resolved and closed.
Thank you for making vestacp it is great :)
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: Trying to remove jpg gif png from access log in Nginx
Would indeed be a nice feature, but you can also do this per vhost. I gathered a few links with examples and definitions:hammy wrote:Just an update.
I have been looking at the logs of my cpanel hosting and they also record the image files.
On another vps I used to use I used a different control panel with debian and vlogger and I was able to remove all of the image files etc and only record the website visit in the 'access logs' maybe this could be a added feature for a later distrobution od vestacp maybe? Maybe an option to not record certain files in your 'access logs' when you get a visitor to your website.
Just a thought as it would vastly reduce the size of the access logs for busy websites.
Sorry for any inconvenience caused this thread can be classed as resolved and closed.
Thank you for making vestacp it is great :)
A small example for limiting by file type is in the server block: http://wiki.nginx.org/Wordpress
The definition of access_log in nginx: http://wiki.nginx.org/HttpLogModule#access_log
Hope this helps.