March 7, 201214 yr comment_10270 Hi I use the standard uniformserver httpd.conf file.The apache access.log file doesn't have that much information as i need. Fore example a piece out of the access.log 127.0.0.1 - - [07/Mar/2012:22:59:19 +0100] "GET /us_splash/css/style.css HTTP/1.1" 200 636127.0.0.1 - - [07/Mar/2012:22:59:19 +0100] "GET /us_splash/images/logo.jpg HTTP/1.1" 304 -127.0.0.1 - - [07/Mar/2012:23:01:18 +0100] "GET /us_splash/index.php HTTP/1.1" 200 1289127.0.0.1 - - [07/Mar/2012:23:01:18 +0100] "GET /us_splash/css/style.css HTTP/1.1" 200 636127.0.0.1 - - [07/Mar/2012:23:01:18 +0100] "GET /us_splash/images/logo.jpg HTTP/1.1" 304 - That's not enough. I want something like this: 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)" How can i do that? Report
March 7, 201214 yr comment_10271 Hi I use the standard uniformserver httpd.conf file.The apache access.log file doesn't have that much information as i need. Fore example a piece out of the access.log That's not enough. I want something like this:How can i do that?Look in your apache httpd.conf file You need to enable mod_logio.c to use %I and %O #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Report
March 8, 201214 yr Author comment_10273 HI Yoni That doesn't work for me. I uncommented the line: LoadModule logio_module modules/mod_logio.so and the log lines in httpd.conf: <IfModule log_config_module> # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # #CustomLog "logs/access.log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio CustomLog "logs/access.log" combined </IfModule> Report
March 8, 201214 yr comment_10275 That was just the reference. Note that you probably have enable logs in your virtual hosts, the httpd.conf main file only logs when there are no other log defined within your installation as far as I can tell. Chances are, taking into account what you are telling me, that there are other logs in your installation as in the case of vhosts... You are probably trying to get more logged info for your awstats This is what you can do: Enable in your main httpd.conf file: CustomLog logs/referer.log referer CustomLog logs/agent.log agent Go to your httpd-vhost.conf and make sure that "your_vhost-access.log" file is configured to log "combined" so you get as much logs as it is declared in your main httpd.conf file e.g: ServerAdmin webmaster@yourdomain.com DocumentRoot X:/UniServer/vhosts/yoursite ServerName yoursite.com ServerAlias yoursite.com ErrorLog logs/yoursite.com-error.log CustomLog logs/yoursite.com-access.log common combined This is what I get from my logs: x.x.x.x - - [08/Mar/2012:06:29:31 -0500] "GET /wordpress/wp-content/plugins/pirobox-extended/css/style_3/blank.gif HTTP/1.1" 404 3595 "http://unlockforus.com/wordpress/wp-content/plugins/pirobox-extended/css/style_3/style.css?ver=3.3.1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20100101 Firefox/10.0.2" Hope this help <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Report
March 8, 201214 yr Author comment_10276 Go to your httpd-vhost.conf and make sure that "your_vhost-access.log" file is configured to log "combined" so you get as much logs as it is declared in your main httpd.conf file <VirtualHost *:80> ServerAdmin webmaster@yourdomain.com DocumentRoot X:/UniServer/vhosts/yoursite ServerName yoursite.com ServerAlias yoursite.com ErrorLog logs/yoursite.com-error.log CustomLog logs/yoursite.com-access.log common combined</VirtualHost> This did the trick for me. Thanks. Report
March 8, 201214 yr comment_10277 Awesome! Glad you figured it out. Just don't forget to update your awstats configuration accordingly otherwise the data won't be reflected on your awstats page. <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Report
March 9, 201214 yr comment_10284 Hmmm. If the Vhosts configurer is installing the log line as "common", it's an error not the best choice.IMHO, that should always be "combined". Regards,BobS Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.