Loading ...
Sorry, an error occurred while loading the content.

Re: [webalizer] mod_rewrite and webalizer!

Expand Messages
  • Enric Naval
    I think that you can t do this, because the redirection is internal, so the original request is never changed. You can t include the subdiretoy name manually
    Message 1 of 7 , Jan 8, 2005
    • 0 Attachment
      I think that you can't do this, because the
      redirection is internal, so the original request is
      never changed.

      You can't include the subdiretoy name manually inside
      te request, because LogFormat uses a single
      undivisible option for the request (%r).

      You COULD do several virtual hosts with *.domain.com,
      each one using a diferent logfile. Inside every
      virtual host container, the CustomLog line would use a
      diferent logfile, like aaa.domain.com.log,
      bbb.domain.com.log.... You can then put together a
      script that will add the correct subdirectory to every
      entry in the file, probably using the command "sed".


      [root]# cat subdir.log
      - - "GET /aipo/mapa.jsp HTTP/1.0" 200 16054
      [root]# sed s/"GET \\/"/"GET \\/subdir"/g subdir.log
      - - "GET /subdir/aipo/mapa.jsp HTTP/1.0" 200 16054
      [root]#



      Also, I don't understand that they made you use %v
      instead of %h, being %v your Apache ServerName, and %h
      the requester's hostname. By doing this, you won't be
      able to see what IP the requests are coming from.
      Webalizer will believe that all you requests origin
      from your server itself!


      --- mike@... wrote:

      > I asked this question on devshed:
      > "
      > I have a problem when using mod_rewrite to redirect
      > *.domain.com to
      > domain.com/* (this.domain.com shows content from
      > domain.com/this) ... This
      > is an internal redirection and not browser based
      > redirection.
      >
      > When I run webalizer for domain.com, It doesnt
      > includes subdomain or
      > directory name in logs. It just has file names,
      > showing how many bytes
      > they have used etc..
      >
      > Is there any way to include the subdomain or
      > directory name as well?
      > I believe there must be some required changes in the
      > LogFormat of apache..
      >
      > Thanks..
      > "
      >
      > And then from i reply, I changed my logformat for
      > the virtualhost as:
      > LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
      > CustomLog /var/www/logs/hirsch.it/vhost_log
      > comonvhost
      >
      > But that didn't do anygood for waiting over a week
      > (new logs and stuff)...
      > It is still showing just the file names ..
      >
      > Any idea how to configure webalizer to include
      > subdir name and the url..
      >
      > Thanks..
      >
      >


      =====
      Enric Naval
      Estudiante de Inform�tica de Gesti�n en la Udl (Lleida)
      GRIHO webalizer.conf
      http://griho.udl.es/webalizer/webalizer.conf.txt



      __________________________________
      Do you Yahoo!?
      Yahoo! Mail - Easier than ever with enhanced search. Learn more.
      http://info.mail.yahoo.com/mail_250
    • jd_314159
      ... url.. Webalizer can only process what s in the logs. If you can get Apache to put what you need into the log file, you can (most likely) analyze it with
      Message 2 of 7 , Jan 8, 2005
      • 0 Attachment
        > Any idea how to configure webalizer to include subdir name and the
        url..

        Webalizer can only process what's in the logs. If you can get Apache
        to put what you need into the log file, you can (most likely) analyze
        it with the Webalizer.

        Depending on how you rewrite URLs and (mostly) how much effort you
        want to put into this, you can probably use RewriteLog output and
        combine it with the logs...

        > LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost

        I agree with Enric that %v in the configuration is most likely your
        hosting company configuration mistake. Talk to them - without either %
        a (address) or %h (address or host name, depending on
        HostnameLookups) any log analyzer isn't going as be much useful.

        If your hosting company doesn't change your log line, you can still
        use Webalizer to analyze your logs - take a look here:

        http://www.stonesteps.ca/projects/webalizer/faq.asp?qid=q20041208-
        01&topic=webalizer

        J.D.

        --- In webalizer@yahoogroups.com, mike@e... wrote:
        > I asked this question on devshed:
        > "
        > I have a problem when using mod_rewrite to redirect *.domain.com to
        > domain.com/* (this.domain.com shows content from
        domain.com/this) ... This
        > is an internal redirection and not browser based redirection.
        >
        > When I run webalizer for domain.com, It doesnt includes subdomain or
        > directory name in logs. It just has file names, showing how many
        bytes
        > they have used etc..
        >
        > Is there any way to include the subdomain or directory name as well?
        > I believe there must be some required changes in the LogFormat of
        apache..
        >
        > Thanks..
        > "
        >
        > And then from i reply, I changed my logformat for the virtualhost
        as:
        > LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
        > CustomLog /var/www/logs/hirsch.it/vhost_log comonvhost
        >
        > But that didn't do anygood for waiting over a week (new logs and
        stuff)...
        > It is still showing just the file names ..
        >
        > Any idea how to configure webalizer to include subdir name and the
        url..
        >
        > Thanks..
      • mike@exocrew.com
        Hello, I read the apache site and I got a log format using which I am getting something like this now: subdirname.domain.com 213.212.222.193 - -
        Message 3 of 7 , Jan 9, 2005
        • 0 Attachment
          Hello,

          I read the apache site and I got a log format using which I am getting
          something like this now:

          subdirname.domain.com 213.212.222.193 - - [08/Jan/2005:21:08:40 -0600]
          "GET /style_images/1/tile_sub.gif HTTP/1.1" 304 -

          subdirname.domain.com goes to domain.com/subdir/ ... I dont mind if
          webalizer can just include the subdomain or the subdir. Anyone of those is
          fine. But will webalizer be able to parse the above logs correctly??

          I used:
          LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon

          Got it from:
          http://httpd.apache.org/docs/vhosts/mass.html

          Thanks for the help..
          >> Any idea how to configure webalizer to include subdir name and the
          > url..
          >
          > Webalizer can only process what's in the logs. If you can get Apache
          > to put what you need into the log file, you can (most likely) analyze
          > it with the Webalizer.
          >
          > Depending on how you rewrite URLs and (mostly) how much effort you
          > want to put into this, you can probably use RewriteLog output and
          > combine it with the logs...
          >
          >> LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
          >
          > I agree with Enric that %v in the configuration is most likely your
          > hosting company configuration mistake. Talk to them - without either %
          > a (address) or %h (address or host name, depending on
          > HostnameLookups) any log analyzer isn't going as be much useful.
          >
          > If your hosting company doesn't change your log line, you can still
          > use Webalizer to analyze your logs - take a look here:
          >
          > http://www.stonesteps.ca/projects/webalizer/faq.asp?qid=q20041208-
          > 01&topic=webalizer
          >
          > J.D.
        • jd_314159
          ... Depends on the version. Some will, some won t. If you use the build by Stone Steps, you can add this to webalizer.conf: ApacheLogFormat %{Host}i %h %l %u
          Message 4 of 7 , Jan 9, 2005
          • 0 Attachment
            > fine. But will webalizer be able to parse the above logs correctly??
            > LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon

            Depends on the version. Some will, some won't. If you use the build
            by Stone Steps, you can add this to webalizer.conf:

            ApacheLogFormat %{Host}i %h %l %u %t \"%r\" %s %b

            You might also want to add referrer, user agent and time taken (%D).
            See more here:

            http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog

            J.D.

            --- In webalizer@yahoogroups.com, mike@e... wrote:
            > Hello,
            >
            > I read the apache site and I got a log format using which I am
            getting
            > something like this now:
            >
            > subdirname.domain.com 213.212.222.193 - - [08/Jan/2005:21:08:40 -
            0600]
            > "GET /style_images/1/tile_sub.gif HTTP/1.1" 304 -
            >
            > subdirname.domain.com goes to domain.com/subdir/ ... I dont mind if
            > webalizer can just include the subdomain or the subdir. Anyone of
            those is
            > fine. But will webalizer be able to parse the above logs correctly??
            >
            > I used:
            > LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
            >
            > Got it from:
            > http://httpd.apache.org/docs/vhosts/mass.html
            >
            > Thanks for the help..
            > >> Any idea how to configure webalizer to include subdir name and
            the
            > > url..
            > >
            > > Webalizer can only process what's in the logs. If you can get
            Apache
            > > to put what you need into the log file, you can (most likely)
            analyze
            > > it with the Webalizer.
            > >
            > > Depending on how you rewrite URLs and (mostly) how much effort you
            > > want to put into this, you can probably use RewriteLog output and
            > > combine it with the logs...
            > >
            > >> LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
            > >
            > > I agree with Enric that %v in the configuration is most likely
            your
            > > hosting company configuration mistake. Talk to them - without
            either %
            > > a (address) or %h (address or host name, depending on
            > > HostnameLookups) any log analyzer isn't going as be much useful.
            > >
            > > If your hosting company doesn't change your log line, you can
            still
            > > use Webalizer to analyze your logs - take a look here:
            > >
            > > http://www.stonesteps.ca/projects/webalizer/faq.asp?qid=q20041208-
            > > 01&topic=webalizer
            > >
            > > J.D.
          • mike@exocrew.com
            Sorry, but I forgot to tell that I am using version 1.3 and not 2.0 so the %D doesnt works for me. Thanks for suggestions.
            Message 5 of 7 , Jan 9, 2005
            • 0 Attachment
              Sorry, but I forgot to tell that I am using version 1.3 and not 2.0 so the
              %D doesnt works for me.

              Thanks for suggestions.

              >
              >
              >> fine. But will webalizer be able to parse the above logs correctly??
              >> LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
              >
              > Depends on the version. Some will, some won't. If you use the build
              > by Stone Steps, you can add this to webalizer.conf:
              >
              > ApacheLogFormat %{Host}i %h %l %u %t \"%r\" %s %b
              >
              > You might also want to add referrer, user agent and time taken (%D).
              > See more here:
              >
              > http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog
              >
              > J.D.
              >
              > --- In webalizer@yahoogroups.com, mike@e... wrote:
              >> Hello,
              >>
              >> I read the apache site and I got a log format using which I am
              > getting
              >> something like this now:
              >>
              >> subdirname.domain.com 213.212.222.193 - - [08/Jan/2005:21:08:40 -
              > 0600]
              >> "GET /style_images/1/tile_sub.gif HTTP/1.1" 304 -
              >>
              >> subdirname.domain.com goes to domain.com/subdir/ ... I dont mind if
              >> webalizer can just include the subdomain or the subdir. Anyone of
              > those is
              >> fine. But will webalizer be able to parse the above logs correctly??
              >>
              >> I used:
              >> LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
              >>
              >> Got it from:
              >> http://httpd.apache.org/docs/vhosts/mass.html
              >>
              >> Thanks for the help..
              >> >> Any idea how to configure webalizer to include subdir name and
              > the
              >> > url..
              >> >
              >> > Webalizer can only process what's in the logs. If you can get
              > Apache
              >> > to put what you need into the log file, you can (most likely)
              > analyze
              >> > it with the Webalizer.
              >> >
              >> > Depending on how you rewrite URLs and (mostly) how much effort you
              >> > want to put into this, you can probably use RewriteLog output and
              >> > combine it with the logs...
              >> >
              >> >> LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
              >> >
              >> > I agree with Enric that %v in the configuration is most likely
              > your
              >> > hosting company configuration mistake. Talk to them - without
              > either %
              >> > a (address) or %h (address or host name, depending on
              >> > HostnameLookups) any log analyzer isn't going as be much useful.
              >> >
              >> > If your hosting company doesn't change your log line, you can
              > still
              >> > use Webalizer to analyze your logs - take a look here:
              >> >
              >> > http://www.stonesteps.ca/projects/webalizer/faq.asp?qid=q20041208-
              >> > 01&topic=webalizer
              >> >
              >> > J.D.
              >
              >
              >
              >
              >
              > Webalizer homepage: http://www.webalizer.org
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
            • Enric Naval
              The official version in webalizer.org will fail to read that correctly. It will believe that subdir.domain.com is the host the visitors are coming from. ...
              Message 6 of 7 , Jan 10, 2005
              • 0 Attachment
                The "official" version in webalizer.org will fail to
                read that correctly. It will believe that
                subdir.domain.com is the host the visitors are coming
                from.


                --- jd_314159 <jd_314159@...> wrote:

                >
                > > fine. But will webalizer be able to parse the
                > above logs correctly??
                > > LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b"
                > vcommon
                >
                > Depends on the version. Some will, some won't. If
                > you use the build
                > by Stone Steps, you can add this to webalizer.conf:
                >
                > ApacheLogFormat %{Host}i %h %l %u %t \"%r\" %s %b
                >
                > You might also want to add referrer, user agent and
                > time taken (%D).
                > See more here:
                >
                >
                http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog
                >
                > J.D.
                >
                > --- In webalizer@yahoogroups.com, mike@e... wrote:
                > > Hello,
                > >
                > > I read the apache site and I got a log format
                > using which I am
                > getting
                > > something like this now:
                > >
                > > subdirname.domain.com 213.212.222.193 - -
                > [08/Jan/2005:21:08:40 -
                > 0600]
                > > "GET /style_images/1/tile_sub.gif HTTP/1.1" 304 -
                > >
                > > subdirname.domain.com goes to domain.com/subdir/
                > ... I dont mind if
                > > webalizer can just include the subdomain or the
                > subdir. Anyone of
                > those is
                > > fine. But will webalizer be able to parse the
                > above logs correctly??
                > >
                > > I used:
                > > LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b"
                > vcommon
                > >
                > > Got it from:
                > > http://httpd.apache.org/docs/vhosts/mass.html
                > >
                > > Thanks for the help..
                > > >> Any idea how to configure webalizer to include
                > subdir name and
                > the
                > > > url..
                > > >
                > > > Webalizer can only process what's in the logs.
                > If you can get
                > Apache
                > > > to put what you need into the log file, you can
                > (most likely)
                > analyze
                > > > it with the Webalizer.
                > > >
                > > > Depending on how you rewrite URLs and (mostly)
                > how much effort you
                > > > want to put into this, you can probably use
                > RewriteLog output and
                > > > combine it with the logs...
                > > >
                > > >> LogFormat "%v %l %u %t \"%r\" %>s %b"
                > comonvhost
                > > >
                > > > I agree with Enric that %v in the configuration
                > is most likely
                > your
                > > > hosting company configuration mistake. Talk to
                > them - without
                > either %
                > > > a (address) or %h (address or host name,
                > depending on
                > > > HostnameLookups) any log analyzer isn't going as
                > be much useful.
                > > >
                > > > If your hosting company doesn't change your log
                > line, you can
                > still
                > > > use Webalizer to analyze your logs - take a look
                > here:
                > > >
                > > >
                >
                http://www.stonesteps.ca/projects/webalizer/faq.asp?qid=q20041208-
                > > > 01&topic=webalizer
                > > >
                > > > J.D.
                >
                >
                >
                >


                =====
                Enric Naval
                Estudiante de Inform�tica de Gesti�n en la Udl (Lleida)
                GRIHO webalizer.conf
                http://griho.udl.es/webalizer/webalizer.conf.txt



                __________________________________
                Do you Yahoo!?
                Yahoo! Mail - Easier than ever with enhanced search. Learn more.
                http://info.mail.yahoo.com/mail_250
              Your message has been successfully submitted and would be delivered to recipients shortly.