Read the FAQ.  Yes, ntop has hard pathing to the root.  We have our own -
limited web server and don't support others.  But there is an article in the
FAQ on how is has been done in the past.

-----Burton

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim
Rhodes
Sent: Saturday, June 23, 2007 7:02 AM
To: [email protected]
Subject: [Ntop] Apache Rewrite Problems

Hi all,

I have ntop v.3.3.1 and I'm pulling my hair out trying to get the Apache 
rewrites working, I'm all googled out so I thought I would seek some 
wisdom here...

Ntop is up and running fine, I've started it like this as suggested in 
the docs:

ntop -u myuser -d -w 15123 -W 0

(I've tried other ports also, just in case)

... and put this in my httpd.conf in my SSL virtualhost:

ProxyPass /ntop/ http://localhost:15123/

... and set up my .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_REFERER} mysslhost.com/ntop
RewriteCond %{REQUEST_URI} !^/ntop
RewriteCond %{REQUEST_URI} !^/error
RewriteRule ^/(.*)$ http://secure.mysslhost.com/ntop/$1 [L,P]

... result:

Browsing https://secure.mysslhost.com/ntop/ (in any browser) displays 
the page but with broken images/links eg. /gauge.jpg instead of 
/ntop/gauge.jpg - if I browse it directly, the image does display so I 
know it's there, I just can't get Apache to rewrite it:

https://secure.mysslhost.com/ntop/gauge.jpg [OK!]

Next, I verified that the rewrites were actually working by adding 
another rewrite rule - the new rule works, so I know my ntop rules are 
being read, they're just not working.

Next, I tried the mod_proxy.c method from the FAQ by putting this in my 
httpd.conf SSL virtualhost (I also tried it outside the virtualhost, in 
the main section):

<IfModule mod_proxy.c>
ProxyPass /ntop/ http://localhost:15123/
ProxyPassReverse /ntop/ http://localhost:15123/

RewriteEngine On
RewriteLogLevel 0
RewriteLog logs/rewrite_log
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/home.html$
RewriteCond %{REQUEST_URI} !^/ntop/
RewriteRule ^/([^/]+\.[a-z]+)$ 
http://secure.mysslhost.com:15123/ntop/$1[L,P]
</IfModule>

Result: same thing, still broken images/links. Again I tested the rules 
by adding a new one in the same section, and the test rule worked but 
the ntop rules still don't work.

Any ideas?????

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.9.4/860 - Release Date: 6/21/2007
5:53 PM
 

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to