Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-11-15 10:40:46

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: .htaccess and awstats

Hey guys ; ).

Zem
Played with your suggestion for a bit but got nowhere.

Graumeister
Made what you suggested (set the level to 3 – didn’t want to kill the server : )) and this is the output:
<code>xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (2) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] rewrite images/domain_r1_c2.gif -> index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] add per-dir prefix: index.php -> /home/httpd/vhosts/domain.com/httpdocs/index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (2) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip document_root prefix: /home/httpd/vhosts/domain.com/httpdocs/index.php -> /index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (1) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] internal redirect with /index.php [INTERNAL REDIRECT]
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#847fcb8/initial/redir#1] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip per-dir prefix: /home/httpd/vhosts/domain.com/httpdocs/index.php -> index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#847fcb8/initial/redir#1] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] applying pattern ‘^(.+)’ to uri ‘index.php’
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#847fcb8/initial/redir#1] (2) forcing ‘/home/httpd/vhosts/domain.com/httpdocs/index.php’ to get passed through to next API URI-to-filename handler
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#847fcb8/initial/redir#1] (1) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] initial URL equal rewritten URL: /home/httpd/vhosts/domain.com/httpdocs/index.php [IGNORING REWRITE]
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip per-dir prefix: /home/httpd/vhosts/domain.com/httpdocs/images/domain_r1_c6.gif -> images/domain_r1_c6.gif
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] applying pattern ‘^(.+)’ to uri ‘images/domain_r1_c6.gif’
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip per-dir prefix: /home/httpd/vhosts/domain.com/httpdocs/images/domain_r1_c6.gif -> images/domain_r1_c6.gif
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] applying pattern ‘^(.*)’ to uri ‘images/domain_r1_c6.gif’
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (2) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] rewrite images/domain_r1_c6.gif -> index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] add per-dir prefix: index.php -> /home/httpd/vhosts/domain.com/httpdocs/index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (2) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip document_root prefix: /home/httpd/vhosts/domain.com/httpdocs/index.php -> /index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84703e0/initial] (1) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] internal redirect with /index.php [INTERNAL REDIRECT]
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84e87c0/initial/redir#1] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] strip per-dir prefix: /home/httpd/vhosts/domain.com/httpdocs/index.php -> index.php
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84e87c0/initial/redir#1] (3) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] applying pattern ‘^(.+)’ to uri ‘index.php’
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84e87c0/initial/redir#1] (2) forcing ‘/home/httpd/vhosts/domain.com/httpdocs/index.php’ to get passed through to next API URI-to-filename handler
xx.xxx.xx.xxx – - [15/Nov/2005:05:36:31 —0500] [www.domain.com/sid#81c82a0][rid#84e87c0/initial/redir#1] (1) [per-dir /home/httpd/vhosts/domain.com/httpdocs/] initial URL equal rewritten URL: /home/httpd/vhosts/domain.com/httpdocs/index.php [IGNORING REWRITE]</code>

Willing to translate that mumbu jumbo into plain English? : )

Last edited by gerhard (2005-11-15 10:41:41)

Offline

#14 2005-11-24 17:35:05

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: .htaccess and awstats

I looked at the installation instructions for awstats, and it uses Alias and Scriptalias in httpd.conf to match requests to its’ scripts. That’s why

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d

is not catching it, because the request does not match a file or directory, but is translated by Apache. You can try to replace the above two lines (from a stock .htaccess in textpattern) with the following:

RewriteCond %{REQUEST_FILENAME} -U

From the manual:

Checks if TestString is a valid URL and accessible via all the server’s currently-configured access controls for that path. This uses an internal subrequest to determine the check, so use it with care because it decreases your server’s performance!

Though I have no experience with how noticable the effect would be.

Offline

#15 2005-11-30 11:15:40

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: .htaccess and awstats

Sencer, thanks mate for chipping in. Tried your suggestion but it still won’t work <code>Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/httpd/vhosts/domain.com/httpdocs/awstats/awstats.pl</code>

The approach that I resorted to is having another subdomain (e.g. stats) for every website that has AWstats running. I’ve also made AWstats available from cgi-bin (reluctantly because a lot of exploiters are probing this dir).

Approaching the issue from another angle was much easier than trying to sort Apache skets out.

Cheers to everyone contributing towards the solution ; ).

Offline

Board footer

Powered by FluxBB