Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Custom log with htaccess

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
how to add custom headers - hi all Can one add custom headers ( for both request and responses )?? Please provide links the above . I heard that one can do above by using APache thanx in advance

Help with custom logs - Hello. I am looking for some help using the LogFormat and CustomLog to create custom logs. Here is what I am trying to do: I have a doman called Under this domain I have several which host different web pages called..

Trying to use custom 404 error page - I have added the following line to my file: 404 forward is a Python program that the server name and forwards a user on to a site-tree of the domain they were looking for. The problem is that it is..

Custom 404 causes problems with cookie - In I added 404 between the /> and tags. In the body I set a cookie called ABC as follows. // Set the ABC cookie, the value where the user's browser is directed after // logging..

Custom Error Pages - Hi All, I am using Apache 2.0.43 / Tomcat 4.1.12 / mod_jk2 , and having no success with using a custom Apache error page (local redirect) or even making plain text For example, in the Apache file httpd: 404 ..
Next:  Apache: Absolute Path errors  
Author Message
Dan Storm

External


Since: Apr 10, 2007
Posts: 4



(Msg. 1) Posted: Tue Apr 10, 2007 7:59 am
Post subject: Custom log with htaccess
Archived from groups: alt>apache>configuration (more info?)

Hi NG!

As far as I have understood, it's not possible to define a customlog or
logformat in htaccess? (I don't have access to the conf)

So, what I want to do now is to make a script handle every request and
make my script create the new log.

But how do I do that in htaccess?

Somewhat:
<Files *>
#comecode to start my script
</Files>

Hope to get some help. Smile

 >> Stay informed about: Custom log with htaccess 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue Apr 10, 2007 7:59 am
Post subject: Re: Custom log with htaccess [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived

 >> Stay informed about: Custom log with htaccess 
Back to top
Login to vote
Dan Storm

External


Since: Apr 10, 2007
Posts: 4



(Msg. 3) Posted: Tue Apr 10, 2007 7:59 am
Post subject: Re: Custom log with htaccess [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi skrev:
> By defining a rewrite rule catch-all and redirect everything to your
> script... but this beg the question: why do you want so?

I want to do so, to make my Urchin track my SSL entries correctly. And
since it's easier for me, to make a new log file, then trying to create
a custom log format (because I don't understand the docs), I wanted to
make sure that all the requests was logged.

But if you have a better alternative, I'm all ears! Smile
 >> Stay informed about: Custom log with htaccess 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Tue Apr 10, 2007 7:59 am
Post subject: Re: Custom log with htaccess [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Dan Storm

External


Since: Apr 10, 2007
Posts: 4



(Msg. 5) Posted: Tue Apr 10, 2007 10:01 am
Post subject: Re: Custom log with htaccess [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi skrev:
> Ok, so this is up to the %b bit, it's missing the referer, user agent and
> cookie.
>
> I think that the idea of catching all the requests to a script and then
> creating a log file in there is going to be way to heavy for processing
> power to be viable. I'd request the hosting to change the log format
> or just use a different log analyzer. But of course is up to you.

The solution was to let Apache make another logfile for the virtualhost
that was running the SSL.

Thanks Smile
 >> Stay informed about: Custom log with htaccess 
Back to top
Login to vote
Dan Storm

External


Since: Apr 10, 2007
Posts: 4



(Msg. 6) Posted: Tue Apr 10, 2007 1:28 pm
Post subject: Re: Custom log with htaccess [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dan Storm skrev:
> But if you have a better alternative, I'm all ears! Smile

Might help if you have the details.
Urchin requires the logformat:

LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User−Agent}i\" \"%{Cookie}i\""

And the log entries outside my HTTPS protocol works with Urchin.

But when using HTTPS the entries is logged another way and when trying
to change the SSL log format the certifikate stalls and/or i can't
access the site securely.




Entry from ssl_log:
80.198.46.2 - - [10/Apr/2007:10:30:40 +0200] "GET
/__utm.gif?utmwv=6.1&utmn=1379502168&utmsr=1024x768&utmsc=32-bit&utmul=da&utmje=1&utmjv=1.3&utmfl=8.0&utmdt=Indk%F8bskurv&utmhn=www.marstrands.com&utmp=/submit_gavekort
HTTP/1.1" 200 35

Entry from access_log:
80.63.33.34 - - [10/Apr/2007:11:55:14 +0200] "GET
/__utm.gif?utmwv=6.1&utmn=1073376464&utmsr=1024x768&utmsc=32-bit&utmul=da&utmje=1&utmjv=1.3&utmfl=9.0&utmcn=1&utmdt=Marstrands.com%20-%20Bolig%2C%20mode%20og%20b%F8rnet%F8j&utmhn=www.marstrands.com&utmr=http://images.google.dk/imgres?imgurl=http://www.marstrands.com/filer/Billeder/Postmand_Per/585002_S.jpg&imgrefurl=http://www.marstrands.com/varekatalog.php%3Fgrp%3D2&h=111&w=111&sz=8&hl=da&start=11&tbnid=loaRi1FqpmTzAM:&tbnh=86&tbnw=86&prev=/images%3Fq%3Dpostmand%2Bper%2Bbil%26gbv%3D2%26ndsp%3D18%26svnum%3D10%26hl%3Dda%26sa%3DN&utmp=/varekatalog.php?grp=2
HTTP/1.0" 200 35 "http://www.marstrands.com/varekatalog.php?grp=2"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)" "-"
 >> Stay informed about: Custom log with htaccess 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]