Configure arachni behind an apache proxy

mailinglist's Avatar

mailinglist

15 Sep, 2013 04:39 PM

Hy,

I've successfully installed arachni scanner at boot start.
I'm able to access to the webui directly from an url.
When I tried behind a proxy, the assets are not rewritten with the proper url.
Is there any conf to set in the server so that it culd fully run behind a proxy.

regards

  1. Support Staff 1 Posted by Tasos Laskos on 15 Sep, 2013 04:52 PM

    Tasos Laskos's Avatar

    Maybe try and configure it to listen on your external IP address instead of the default (0.0.0.0)?

    0.0.0.0 of 127.0.0.1 can be problematic for proxies.

  2. 2 Posted by mailinglist on 15 Sep, 2013 05:09 PM

    mailinglist's Avatar

    Tasos,

    Thanks for your fast answer.
    Here is my virtual host conf :

    
        ServerName my.litteraldomain.com
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass /arachni http://myip:9292/
        ProxyPassReverse /arachni http://myip:9292/
        ProxyPassReverse /arachni http://my.litteraldomain.com
         < Proxy http://myip:9292/* >
            Order deny,allow
            Allow from all
         < /Proxy >
         < Location /arachni >
            Order allow,deny
            Allow from all
         < / Location >
    
    When I do this, I can access to the start page without correct assets and when I log in, I'm redirect to a wrong URL

    For information, I successfully configured a proxy without the /arachni location. My point is when I add a location behind,

    regards

  3. Support Staff 3 Posted by Tasos Laskos on 15 Sep, 2013 05:19 PM

    Tasos Laskos's Avatar

    I meant configuring the web interface to listen on a specific address:

    bin/arachni_web --host <address>
    

    For more options:

    bin/arachni_web -h
    
  4. 4 Posted by mailinglist on 15 Sep, 2013 05:24 PM

    mailinglist's Avatar

    Hy tasos,

    I tried your proposal, --host without success.
    The home page is displayed without any css and the links are all related to the root of my wirtual host

  5. Support Staff 5 Posted by Tasos Laskos on 15 Sep, 2013 06:00 PM

    Tasos Laskos's Avatar

    No sure if you can mount it under a different directory like that, you're breaking the structure of the webapp.

  6. 6 Posted by mailinglist on 15 Sep, 2013 06:13 PM

    mailinglist's Avatar

    Hy tasos,

    Thanks for your answer. I was loosing my hairs.
    Since it couldn't be served like this, is it possible to add a feature for an option in the server with the path to be served?

    Of course, this question could be closed.

    Thanks

  7. Support Staff 7 Posted by Tasos Laskos on 15 Sep, 2013 08:26 PM

    Tasos Laskos's Avatar

    I got stuck at the same place, making the assets show properly. There must be a solution though so I'll keep digging and let you know how it goes.

  8. Support Staff 8 Posted by Tasos Laskos on 16 Sep, 2013 08:00 PM

    Tasos Laskos's Avatar

    Giving up on this. Sorry, but the system wasn't designed to be used this way and I can't find an easy (or any) workaround for you.

  9. Tasos Laskos closed this discussion on 16 Sep, 2013 08:00 PM.

  10. Tasos Laskos re-opened this discussion on 18 Sep, 2013 07:03 PM

  11. Support Staff 9 Posted by Tasos Laskos on 18 Sep, 2013 07:03 PM

    Tasos Laskos's Avatar

    OK I figured out how to mount the WebUI under a subdirectory ("arachni" in this case):

    1. Grab a nightly.
    2. system/arachni-web-ui/config/application.rb -- https://gist.github.com/Zapotek/6612327
      • config.assets.prefix = '/arachni/assets' (Line)
    3. system/arachni-web-ui/config/routes.rb -- https://gist.github.com/Zapotek/6612310
      • All routes are scoped: scope 'arachni' (Line)
    4. ./bin/arachni_web_task assets:precompile
  12. Tasos Laskos closed this discussion on 18 Sep, 2013 07:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac