Configure NTOP To Proxy Through Apache

ntop_logo The NTOP faq contains snippets of code about how to proxy the NTOP http server through Apache for improved security. However, with new updates to the program the image iFrames are incorrectly posting the following javascript:

<script type="test/javascript">

The correct output should be:

<script type="test/javascript">

Using the mod_proxy_html module we can modify the pages using the following:

ProxyHTMLURLMap  /ntop//ntop/      //

The full NTOP proxy configuration is as follows:

<IfModule mod_proxy_http.c>
        ProxyHTMLLogVerbose On
        LogLevel warn
        ProxyHTMLExtended On

        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                Allow from all

        ProxyPass /ntop/  http://localhost:3000/
        ProxyPassReverse /ntop/  http://localhost:3000/

        <Location /ntop/>
                SetOutputFilter  proxy-html
                ProxyHTMLURLMap  /      /ntop/
                ProxyHTMLURLMap  /ntop//ntop/      //
                ProxyHTMLURLMap /ntop/plugins/ntop/ /ntop/plugins/
                RequestHeader    unset  Accept-Encoding

Leave a Reply

Your email address will not be published. Required fields are marked *