Re: Awstats and re-write rule for Zope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all of your help, but I am still having problems in setting
this up.

Here is the vhosts entry in my /etc/apache2/vhosts.d/domain.conf file

<VirtualHost *:80>
  ServerName domain.com
  ServerAlias www.domain.com
  RewriteEngine On
  #DenyHosts Rules
  RewriteMap    hosts-deny      txt:/home/user/apache/hosts.deny
  RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
  RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
  RewriteCond   ${hosts-deny:%{HTTP:true-client-ip}|NOT-FOUND} !=NOT-FOUND
  RewriteRule   ^/.*  -  [F]
  #AWStats Rules
  RewriteRule ^/awstats/(.*) /awstats/$1 [L,PT]
  RewriteRule ^/awstatsclasses/(.*) /awstatsclasses/$1 [L,PT]
  RewriteRule ^/awstatscss/(.*) /awstatscss/$1 [L,PT]
  RewriteRule ^/awstatsicons/(.*) /awstatsicons/$1 [L,PT]
  #Zope Rules
  RewriteRule ^/(.*)
http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/$1
[L,P]
  Alias /awstatsclasses "/usr/share/webapps/awstats/6.5-r1/htdocs/"
  Alias /awstatscss "/usr/share/webapps/awstats/6.5-r1/htdocs/css/"
  Alias /awstatsicons "/usr/share/webapps/awstats/6.5-r1/htdocs/icon/"
  Alias /icon "/usr/share/webapps/awstats/6.5-r1/htdocs/icon/"
  ScriptAlias /awstats/
"/usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/"
  #Logs
  ErrorLog /var/log/apache2/domain_error.log
  CustomLog /var/log/apache2/domain_access.log combined
  RewriteLog /var/log/apache2/domain_rewrite_log
  RewriteLogLevel 9
</VirtualHost>


The RewriteLog does not give me any information as the site returned
when I go to http://domain.com/awstats is the one from the Zope server
and then I get a Zope Error that the page is not found.

If I remove the Rule for zope, and then go to http://domain.com/awstats
it works fine.

Here is part of the RewriteLog

74.6.74.199 - - [07/Mar/2007:19:42:42 +0100]
[domain.com/sid#82b9c88][rid#84fa898/initial] (2) rewrite
/catalogue/c13586/c13840/c13956/c13965 ->
http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/catalogue/c13586/c13840/c13956/c13965
74.6.74.199 - - [07/Mar/2007:19:42:42 +0100]
[domain.com/sid#82b9c88][rid#84fa898/initial] (2) forcing
proxy-throughput with
http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/catalogue/c13586/c13840/c13956/c13965
74.6.74.199 - - [07/Mar/2007:19:42:42 +0100]
[domain.com/sid#82b9c88][rid#84fa898/initial] (1) go-ahead with proxy
request
proxy:http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/catalogue/c13586/c13840/c13956/c13965
[OK]
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (2) init rewrite engine
with requested uri /information/terms_conditions
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/.*' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (6) cache lookup FAILED,
forcing new map lookup
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (5) map lookup FAILED:
map=hosts-deny[txt] key=74.6.69.116
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (4) RewriteCond:
input='NOT-FOUND' pattern='!=NOT-FOUND' => not-matched
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (5) cache lookup OK:
map=hosts-deny[txt] key=74.6.69.116 -> val=
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (4) RewriteCond:
input='NOT-FOUND' pattern='!=NOT-FOUND' => not-matched
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (5) cache lookup OK:
map=hosts-deny[txt] key= -> val=
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (4) RewriteCond:
input='NOT-FOUND' pattern='!=NOT-FOUND' => not-matched
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/awstats/(.*)' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/awstatsclasses/(.*)' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/awstatscss/(.*)' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/awstatsicons/(.*)' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (3) applying pattern
'^/(.*)' to uri '/information/terms_conditions'
74.6.69.116 - - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (2) rewrite
/information/terms_conditions ->
http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/information/terms_conditions74.6.69.116
- - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (2) forcing
proxy-throughput with
http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/information/terms_conditions74.6.69.116
- - [07/Mar/2007:19:44:27 +0100]
[domain.com/sid#82b9c88][rid#85158f8/initial] (1) go-ahead with proxy
request
proxy:http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/information/terms_conditions
[OK]

Any insight into this, or pointers would be greatly appreciated.

Many thanks

Norman



Gaël Lams wrote:
> Hi
> 
> I personnaly use the following similare rewrite rules on a few zope
> instances and it works perfectly:
> 
>    RewriteEngine on
>    RewriteRule ^/awstats/(.*) /awstats/$1 [L,PT]
>    RewriteRule ^/awstatsclasses/(.*) /awstatsclasses/$1 [L,PT]
>    RewriteRule ^/awstatscss/(.*) /awstatscss/$1 [L,PT]
>    RewriteRule ^/awstatsicons/(.*) /awstatsicons/$1 [L,PT]
>    RewriteRule ^/(.*)
> http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/folder_name/VirtualHostRoot/$1
> 
> [L,P]
> 
> plus the following lines:
> 
>    #
>    # Directives to add to your Apache conf file to allow use of
> AWStats as a CGI.
>    # Note that path "/usr/local/awstats/" must reflect your AWStats
> Installation path.
>    Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
>    Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
>    Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
>    Alias /icon "/usr/local/awstats/wwwroot/icon/"
>    ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
> 
> Kind regards,
> 
> Gaël
> 

-- 
Norman Khine
7 rue Ponscarme, Paris, 75013, France
tel +33 870 628 934 fax +33 142 724 4437
email: norman@xxxxxxxxx

http://www.abakuc.com http://www.uktravellist.info
http://www.destinationsguide.info



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux