On 10:13, lunedì 29 maggio 2006, Axel-Stéphane SMORGRAV wrote:
> It is really hard to understand exactly what your problem is because your
> description is so sketchy. My understanding is that when you request
> http://pippo/ntop/showPlugins.html?icmpWatch, the backend server issues a
> redirect to http://localhost:3000/plugins/icmpWatch which you expect the
> reverse proxy to rewrite into http://pippo/ntop/plugins/icmpWatch. Instead
> it gets rewritten into http://pippo/ntop/plugins/ntop/icmpWatch and the
> backend server receives a request for
> http://localhost:3000/plugins/ntop/icmpWatch which results in a HTTP 404.
>

 yes, you have well understood the problem..
better than me :-)  

in apache I'm a beginner !


> If I have understood you correctly, the culprit is in the ProxyPassReverse
> statements.

>
> What you should be aware of is that
>
> <Location /ntop/>
>       ProxyPassReverse /
> </Location>
>
> is equivalent to
>
>       ProxyPassReverse /ntop /
>
>
> If I strip down your configuration a bit, you have roughly:
>
> ProxyPass /ntop/  http://localhost:3000/
> ProxyPassReverse /ntop/  http://localhost:3000/
>
> <Location /ntop/>
> ProxyPassReverse /
> </Location>
>
> which is equivalent to
>
> ProxyPass /ntop/  http://localhost:3000/
> ProxyPassReverse /ntop/  http://localhost:3000/
> ProxyPassReverse /ntop /
>
> which may be the source of your problem.
>
> RECOMMENDATION 1: Remove "ProxyPassReverse /" from within <Location /ntop/>

done


>
> The other thing I note in your configuration, is that you have an identity
> transformation that I believe you should remove:
>
> ProxyHTMLURLMap  /ntop  /ntop
>
> RECOMMENDATION 2: Remove the above ProxyHTMLURLMap from your configuration.

done 
but not solved the problem "/ntop/plugins/" -> "ntop/plugins/ntop/"

Seem that css/script in the main page follow the main rule to add /ntop/ to 
everything. In fact /ntop" is added to any-thing included "/ntop/plugins that 
becomes "/ntop/plugins/ntop".
Probably we should say to not add ntop to the dir /ntop/plugins when request 
come from main page.



Many thanks for your help
- Giovanni- 



>
> -ascs
>
> -----Original Message-----
> From: Giovanni [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 24, 2006 7:58 PM
> To: users@httpd.apache.org
> Subject: [EMAIL PROTECTED] ProxyPass and reverse
>
>
> Hello, I used apache2 to reverse-proxy
>
> web proxy dir  /ntop/    -> to application localhost dir ->
> http://localhost:3000/
>
> So when I do: http://pippo/ntop  I see everything, graphics, numbers, hosts
> graphics..
> ROOT PATH are ok, I can see them:
> es: /ntop/sortDataThpt.html
>      /ntop/172.16.0.1.html
>      /ntop/showPlugins.html?icmpWatch
>
> BUT SUBDIR NO !
> es: /ntop/plugins/LastSeen
> es: /ntop/plugins/icmpWatch
>
> Can't see them, i receive this error:
>
> #######
> Error 404
> The server cannot find the requested page (page expired or ntop
> configuration ?).
> Received request:
>     "GET /plugins/ntop/icmpWatch HTTP/1.1"
> #######
>
> What's wrong?
> localhost:3000/plugins/icmpWatch  seem to translate
> -> /ntop/plugins/ntop/icmpWatch
>
> Any idea?
>
>
> This is my configuration
>
> #### NTOP (PROXY REVERSE) on virtual host ########
>
> ProxyHTMLLogVerbose On
> LogLevel warn
> ProxyHTMLExtended On
>
> ProxyRequests Off
> <Proxy *>
> Order deny,allow
> Allow from all
> </Proxy>
>
> ProxyPass /ntop/  http://localhost:3000/
> ProxyPassReverse /ntop/  http://localhost:3000/
>
> <Location /ntop/>
> ProxyPassReverse /
> SetOutputFilter  proxy-html
> ProxyHTMLURLMap  /      /ntop/
> ProxyHTMLURLMap  /ntop  /ntop
> RequestHeader    unset  Accept-Encoding
> </Location>
>
> #######################################
>
>
> Thanks!!
>
>
> Bye
> - Giovanni -
>
>
>
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to