Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Trying to remove jpg gif png from access log in Nginx

General questions about VestaCP
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
hammy
Posts: 23
Joined: Tue May 06, 2014 2:46 pm

Trying to remove jpg gif png from access log in Nginx
  • Quote

Post by hammy » Tue May 06, 2014 2:57 pm

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

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
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.
Last edited by hammy on Sat May 10, 2014 4:59 pm, edited 1 time in total.
Top

hammy
Posts: 23
Joined: Tue May 06, 2014 2:46 pm

Re: Trying to remove jpg gif png from access log using SetEn
  • Quote

Post by hammy » Sat May 10, 2014 4:58 pm

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

hammy
Posts: 23
Joined: Tue May 06, 2014 2:46 pm

Re: Trying to remove jpg gif png from access log in Nginx
  • Quote

Post by hammy » Thu May 22, 2014 2:35 am

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

hammy
Posts: 23
Joined: Tue May 06, 2014 2:46 pm

Re: Trying to remove jpg gif png from access log in Nginx
  • Quote

Post by hammy » Fri May 23, 2014 1:17 am

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 :)
Top

drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

Re: Trying to remove jpg gif png from access log in Nginx
  • Quote

Post by drMacFaulty » Sat May 24, 2014 11:59 am

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 :)
Would indeed be a nice feature, but you can also do this per vhost. I gathered a few links with examples and definitions:
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.
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password