aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMuleWeb and Apache Proxy  (Read 2186 times)

java8964

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
aMuleWeb and Apache Proxy
« on: November 20, 2007, 04:53:44 PM »

Hi, I have a question about aMuleWeb related to Apache proxy.
My Environment:
OS: Open Suse 10.3 (i586, 32bit)
aMule Version: aMule-CVS-20071119.tar.bz2
./configure summary:
             **** General Libraries and Tools ****
            Should ccache support be enabled?                          no
            Libraries aMule will use to build:
                                       wxWidgets             2.8.4 (gtk2,shared)                                       crypto++              embedded
                                       libpng                1.2.18
                                       libgd                 2.0.35
                                       zlib                  1.2.3

I followed the AmuleWeb wiki and FAQ. Everything works fine. The init script works fine too. I can login http://localhost:4711 and connect to a server with high id. But I have a unique feature requirement for my environment and wonder if the current version of aMule can support it or not.

I have a LAN at home with multi Linux boxes. One of them is the web server (HostA) and another one I plan to use it as Amule purpose only (Host B). For outside of the world, I make the port 443(https) of  hostA available. In LAN, I have no problem to access http://hostB:4711 to access aMule and download files. But if I am not at home and would like to download a file, I hope I can access aMuleweb. So I set up a Aparch proxy as following:
https://hostA/amule will proxy to http://hostB:4711
The proxy works fine as planned. I can get the aMule login page(without the picture though). But after login, I will get almost blank page that some url Not Found error, like this:
Code: [Select]
Not Found
The requested URL /top.html was not found on this server.
I believe the problem is that aMuleWeb will always think itself as web root /, even though in proxy case, it should be under /amule/. Is there any aMuleweb configuration supporting this? I am not a php programmer, but knows a little about Java servlet. For any URL, can aMuleweb always do something like getRequestURL(), then append the html or php file name? In this case, aMuleWeb will support my case and more flexible. Please let me know if this is possible for the current version of aMule and how I can do it. If not, can this be considered in the future release?

Thanks

Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: aMuleWeb and Apache Proxy
« Reply #1 on: November 20, 2007, 08:13:29 PM »

IANAE (I Am Not Apache Expert) :) , but that is strange. I don't know how the Apache proxy works, but if amuleweb works from the inner network, why should it not work proxied through Apache?

Maybe you could sniff the network with wireshark to see exactly what request Apache is forwarding?

Another possibility is that you port forward port 4711 from your firewall machine to the machine running amuleweb. But that would be less fun :)

Cheers!
Logged

java8964

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: aMuleWeb and Apache Proxy
« Reply #2 on: November 20, 2007, 08:38:06 PM »

Thanks for the reply.

I figured out the problem. I think I made a mistake. In fact, it just works as I hope. The only difference is that from outside, I need to visit aMuleweb like this:

https://external_ip/amule/

instead of what I did original:

https://external_ip/amule
(no ending "/" in this case)

then everything works smoothly. I already download the first Ebook I needed, from my office controlling it at home :-) Thanks and way to go, aMule.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: aMuleWeb and Apache Proxy
« Reply #3 on: November 20, 2007, 09:00:52 PM »

Well, you made it work, but still sounds ugly that http://asdf/somedir is different from http://asdf/somedir/

You were lucky to figure it out.

I wonder if the problem is on Apache or amuleweb.

Cheers!
Logged