Re: Awstats and re-write rule for Zope

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

 




Vincent Bray wrote:
> On 08/03/07, Norman Khine <norman@xxxxxxxxx> wrote:
>> <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.
> 
> Could you post a rewrite log of a request for /awstats? Your last post
> didn't include that and if as you say requesting /awstats proxies the
> request to zope, then your rewrite rules must be running, in one form
> or other.
> 
> Also, did you try my initial suggestion of putting a negative
> condition for /awstats prior to the proxy rule?
> 
> # No anchor before awstats
> RewriteCond %{REQUEST_URI} !awstats
> RewriteRule ^/(.*)
> http://domain.com:4080/VirtualHostBase/http/domain.com:80/shops/shop1/VirtualHostRoot/$1
> 
> [L,P]
> 

Nice one Vincent, many thanks the RewriteCond %{REQUEST_URI} !awstats
did the trick.

Thank you all.

Regards

Norman


---------------------------------------------------------------------
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