You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Martin Lemanski <ma...@gmx.at> on 2012/09/24 03:30:40 UTC
[users@httpd] Apache2 - Logging
Hi there,
I have Apache2.2 installed on Debian.
It works as a HTTPS Proxy to a Jenkins Server (on Tomcat).
When I run Jenkins a view minutes with auto refresh on, my
/var/log/apache2/other_vhosts_access.log gets really big with many static
requests, which are repeated all 15? seconds.
All I find on the internet is how to set custom logfiles for apache.
How can I limit the log-output - I don't need to see all these requests. I
want to see unique requests.
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:25 +0200] "GET /jenkins/
HTTP/1.1" 200 6107 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;
WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/css/style.css HTTP/1.1" 200 6106 "https://
<https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/event/event-min.js HTTP/1.1" 200 5530
"https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/behavior.js HTTP/1.1" 200 2891 "https://
<https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/animation/animation-min.js HTTP/1.1"
200 5274 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/css/color.css HTTP/1.1" 200 1291 "https://
<https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/dom/dom-min.js HTTP/1.1" 200 6267
"https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/connection/connection-min.js HTTP/1.1"
200 4826 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/yahoo/yahoo-min.js HTTP/1.1" 200 3402
"https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/container/container-min.js HTTP/1.1"
200 20979 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/dragdrop/dragdrop-min.js HTTP/1.1" 200
7370 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/autocomplete/autocomplete-min.js
HTTP/1.1" 200 7642 "https:// <https://%3cmysever%3e/jenkins/>
<mysever>/jenkins/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;
WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/element/element-min.js HTTP/1.1" 200
3082 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/yui/datasource/datasource-min.js HTTP/1.1"
200 8840 "https:// <https://%3cmysever%3e/jenkins/> <mysever>/jenkins/"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
<mysever>:443 <mysever> - - [24/Sep/2012:03:07:27 +0200] "GET
/jenkins/static/7887a7e2/scripts/prototype.js HTTP/1.1" 200 39806 "https://
<https://%3cmysever%3e/jenkins/> <mysever>/jenkins/" "Mozilla/5.0
(compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
If you tell me the config, please tell me where to place it. Most of the
time I find myself with config-snippets, but no location to put them in
(about 70% of found help-resources don't provide this information or I can't
see it)
Regards,
Martin
Re: [users@httpd] Apache2 - Logging
Posted by Mark Montague <ma...@catseye.org>.
On September 23, 2012 21:30 , "Martin Lemanski" <ma...@gmx.at>
wrote:
> When I run Jenkins a view minutes with auto refresh on, my
> /var/log/apache2/other_vhosts_access.log gets really big with many
> static requests, which are repeated all 15? seconds.
>
> All I find on the internet is how to set custom logfiles for apache.
>
> How can I limit the log-output – I don’t need to see all these
> requests. I want to see unique requests…
>
Apache HTTP Server does not support logging only SOME requests -- you
either log all requests, or you log none. I recommend that you log requests.
What you want is a log analyzer that will show you only the information
you are interested in. Many log analyzers exist, see
https://en.wikipedia.org/wiki/List_of_web_analytics_software Personally,
I like JAWStats, which is not on this list.
Alternatively, you can write a simple script to filter out lines from
your log file that you don't want to see.
> If you tell me the config, please tell me where to place it. Most of
> the time I find myself with config-snippets, but no location to put
> them in (about 70% of found help-resources don’t provide this
> information or I can’t see it)
>
This information is usually not provided because different distributions
choose to put the Apache HTTP Server configuration files in different
locations. If you are running Debian, consult the Debian documentation
to learn where Debian puts its httpd configuration files and how Debian
expects you to manage them. Also, it's not as good as consulting your
distribution's documentation, but often you can find out by running
"httpd -V" and looking at the value for SERVER_CONFIG_FILE (which you
should prefix with the value of HTTPD_ROOT if SERVER_CONFIG_FILE does
not begin with a /).
Once you know what file to put the configuration in, you then have to
choose where to put it in the file.
First is deciding between server config context ("global context") which
applies to all virtual hosts, and virtual host context, which only
applies to a specific virtual host:
https://httpd.apache.org/docs/2.4/mod/directive-dict.html#Context
Next, within a context, you have to figure out which section to put the
directives into. This will depend on if you want the directive to apply
to a certain URI path (in which case you should put the directives in a
Location or LocationMatch section), or if you want the directives to
apply to a certain filesystem path (in which case you should put the
directives in a Directory or DirectoryMatch section). There are also
Files and FileMatch sections (for directives which apply to certain
names, and Proxy and ProxyMatch sections (for directives which should
apply only to proxied requests). Or you can put most directives directly
into the server config context or a virtual host context, in order to
have the directives apply to all requests. For more information, see
https://httpd.apache.org/docs/2.4/sections.html
--
Mark Montague
mark@catseye.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org