You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by André Fonseca - CGU <an...@cgu.gov.br> on 2006/09/20 15:30:33 UTC

[users@httpd] Rewrite Engine not working

Hello,

I´m trying to get NTOP to work through an Apache Proxy, as described in 
HOW-TO from http://linuxdotmy.multiply.com/notes/item/20

In my case, if a request comes to http://sagittarius/ntop/, I want to 
proxy it to http://uranus:3000/

For this, I enabled mod_proxy and mod_proxy_http in httpd.conf. I also 
added the line:

ProxyPass /ntop/ http://uranus:3000/

The proxying part is fine, but because NTOP uses absolute URLs, some 
files don´t get proxied. The solution for this, as said in the how-to 
mentioned earlier,
is to use the rewrite engine. So, for this, I added the following lines 
on httpd.conf:

RewriteEngine On
RewriteLogLevel 9
RewriteLog /var/log/httpd/rewrite_log
RewriteCond %{HTTP_REFERER} sagittarius/ntop
RewriteCond %{REQUEST_URI} !^/ntop
RewriteCond %{REQUEST_URI} !^/error
RewriteRule ^/(.*)$ http://sagittarius/ntop/$1 [L,P]

According to the how-to, NTOP should work. Instead, it seems that the 
rewrite rule doesn´t get applied, the rewrite_log file is empty and NTOP 
doesn´t work
properly.

Any ideas?

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org