Difference between revisions of "AMuleWeb"

From AMule Project FAQ
Jump to: navigation, search
Line 1: Line 1:
 +
== Description ==
 +
 
AMuleWeb is a utility that listens for [http://www.w3.org/MarkUp HTTP] connections at port 4711 (by default, although it can be changed through '''Preferences''') and allows remote users to control [[aMule]] using just a web browser.  
 
AMuleWeb is a utility that listens for [http://www.w3.org/MarkUp HTTP] connections at port 4711 (by default, although it can be changed through '''Preferences''') and allows remote users to control [[aMule]] using just a web browser.  
  
 
[[aMule]] itself doesn't support listening to [http://www.w3.org/MarkUp HTTP] connections, so the external utility AMuleWeb is used. This utility listens for remote connections, and once the link between AmuleWeb and the remote user is established, it connects to the [[aMule]] main program using the [[External Connections]] mechanism.
 
[[aMule]] itself doesn't support listening to [http://www.w3.org/MarkUp HTTP] connections, so the external utility AMuleWeb is used. This utility listens for remote connections, and once the link between AmuleWeb and the remote user is established, it connects to the [[aMule]] main program using the [[External Connections]] mechanism.
 +
 +
== Compiling aMuleWeb ==
 +
 +
[[Compile]] [[aMule]] normally, just add ''--enable-amuleweb'' whe nrunning ''configure''.
 +
 +
== Setting up [[aMuleWeb|Webserver]] with [[aMule]] ==
 +
 +
=== Webserver with [[aMule]] 2.0.0 or later ===
 +
 +
*For users running the monotlithic [[aMule]] application:
 +
**Go to "Preferences"->"Remote Controls" (in [[aMule]]) and...
 +
***Enable "Accept External Connections".
 +
***Enable "Use TCP ports instead of unix local sockets" (This option doesn't exist since version 2.1.0)
 +
***Enter a password for [[External Connections]]. If you don't do this, aMuleWeb will not communicate with [[aMule]].
 +
::'''NOTE:''' When you change your aMuleWeb and [[External Connections]] ports here, make sure to restart [[aMule]].
 +
 +
*For users running the [[aMule|aMule daemon]]:
 +
**Shutdown [[aMule|aMuled]] if it is still running.
 +
**Run ''amuleweb -w'' to generate ''~/.aMule/remote.conf'' and edit it for these options. It previously were on ''~/.aMule/amule.conf'', but the lines are still on this file, so edit both if in doubt.
 +
***''[ExternalConnect]'' <- Section header
 +
***''AcceptExternalConnections=1'' <-- To enable [[aMule]] listening for [[External Connections]].
 +
***''ECUseTCPPort=1'' <-- To use the [http://www.faqs.org/faqs/internet/tcp-ip/resource-list TCP] port. Very important since [http://www.unix.org Unix] sockets are disabled.
 +
***''ECPassword=ca3c365274907c6fd527068788e14639'' <-- To find the MD5 string for your password, do:
 +
:::''$ echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1''
 +
:::''ca3c365274907c6fd527068788e14639''
 +
**Restart [[aMule|aMuled]]
 +
 +
'''NOTE:''' In [[aMule]] version 2.0.0 and later you don't need to do any copy/link of [[aMuleWeb|webserver]] files.
 +
 +
Thanks to [[User:Stefanero|Stefanero]], from who I shamelessly stole a lot from his tutorial.
 +
 +
=== Webserver with [[aMule]] 2.0.0-rcX versions ===
 +
 +
*[http://www.gnu.org/software/tar/tar.html Untar] the sources and copy '''''src/aMule.tmpl''''' or in new versions (you are using a ''new version'' if you don't have the file ''aMule.tmpl'' in ''src/'') only the following dir '''''src/webserver/''''' into your '''''~/.aMule/''''' directory. The following (run from the sources directory), should do so:
 +
:''$ cp -r src/aMule.tmpl src/webserver/ ~/.aMule/''
 +
 +
* If you installed [[aMule]] from rpm, then you can do:
 +
:''$ cp /usr/share/amuleweb/aMule.tmpl ~/.aMule/''
 +
:''$ cp -r /usr/share/amuleweb/webserver/ ~/.aMule/''
 +
:'''NOTE''': Note that in current versions (since [[aMule]] 2.0.0) the above step is not necessary (in fact, it is incorrect).
 +
 +
*Go to "Preferences"->"Remote Controls" (in [[aMule]]) and...
 +
**Enable "Accept External Connections".
 +
**Enable "Use TCP ports instead of unix local sockets".
 +
**Enter a password for external connections. If you don't do this, amuleweb will not communicate with amule.
 +
 +
::'''NOTE:''' On some early [[aMule]] 2.0.0-rcX versions the above options weren't available (or didn't work). Use this if you want to run [[aMuled]], too. If you are using such [[aMule]] version and you don't wish to upgrade, then do the following:
 +
 +
:Shutdown [[aMule]] if it is still running.
 +
:Edit your ''~/.eMule'' file, locate the ''[ExternalConnect]'' section and change:
 +
::''AcceptExternalConnections=1'' <-- To enable [[aMule]] listening for [[External Connections]].
 +
::''ECUseTCPPort=1'' <-- To use the [http://www.faqs.org/faqs/internet/tcp-ip/resource-list TCP] port. Very important since [http://www.unix.org Unix] sockets are disabled.
 +
::''ECPassword=ca3c365274907c6fd527068788e14639'' <-- To find the MD5 string for your password, do:
 +
:::''$ echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1''
 +
:::''ca3c365274907c6fd527068788e14639''
 +
 +
::'''NOTE:''' Since [[aMule]] 2.0.0 the ''~/.eMule'' file is now called ''~/.aMule/amule.conf''.
 +
 +
*Restart [[aMule]]
 +
 +
*Go to your "Preferences"->"Remote Controls" (in [[aMule]]) and setup your passwords here for [[External Connections]] and aMuleWeb login.
 +
::'''NOTE:''' When you change your aMuleWeb and [[External Connections]] ports here, make sure to restart [[aMule]].
 +
::'''NOTE:''' that ''"Enable aMuleWeb"'' has no effect and will be renamed in 2.0.0rc8. aMuleWeb is always enabled as long as you have [[External Connections]] enabled.
 +
::'''NOTE:''' For users running [[aMuled|aMule Daemon]] you have to edit the ''.eMule'' file like shown above. For a way to setup a password check the [[Webserver-1.2.x|1.2.8 aMule HowTo]]. You can still do it in the same way.
 +
 +
*Now you're done! You are ready to run amuleweb and connect to it.
 +
 +
'''[[User:Stefanero|Stefanero]]'''
 +
 +
=== [[Webserver-1.2.x|Webserver with aMule 1.2.8 or earlier]] ===
 +
 +
Read [[Webserver-1.2.x|this article]].
 +
 +
== Connecting to [[aMuleWeb|amuleweb]] ==
 +
 +
To run aMuleWeb run '''''amuleweb''''' on a terminal.
 +
 +
Once aMuleWeb is running, open a web browser and connect to:
 +
 +
''http://host:port''
 +
 +
where ''host'' stands for your host's name (try with ''localhost'') and port stands for the aMuleWeb port ('''NOT''' the [[External Connections]] port).
 +
 +
For example: ''http://localhost:4711''
 +
 +
== Standard ports ==
 +
 +
The ports can be set to anything, but this are the most used (the standard ones):
 +
 +
*[[External Connections]]: 4712
 +
*amuleweb: 4711
 +
 +
Make sure you do not confuse with what each of them is.
 +
 +
== Skin support ==
 +
 +
aMuleWeb now looks for its files in a number of places:
 +
*In your home directory: ''$HOME/.aMule/webserver/''[skin name]''/''
 +
*And at it's install location, in this order (by default, ''/usr/local/share/amule/webserver'' if you compiled [[aMule]], or ''/usr/share/amule/webserver'' if you installed it from a package).
 +
 +
Default skin (template) name is 'default'.
 +
 +
If, '''after installing''' [[aMule]], aMuleWeb refuses to run because of not being able to load template:
 +
*Please report this situation to us, and then
 +
*Create the directories ''webserver/default'' in the ''.aMule'' subdirectory of your home directory, and copy the contents of the ''src/webserver'' directory there from the [[aMule]] tarball (I mean to ''$HOME/.aMule/webserver/default'').
 +
 +
'''[[User:GonoszTopi|GonoszTopi]]'''
 +
 +
== Where to report problems and questions? ==
 +
 +
For Problems or Questions just report on http://forum.amule.org forum or join [[IRC]] channel [irc://irc.freenode.net/amule #amule] at [irc://irc.freenode.net irc.freenode.net]
 +
 +
== Other sources of information ==
 +
 +
Read the aMuleWeb man page, which is available in English, French, German, Hungarian and Spanish.
  
 
For further information read the [[FAQ_webserver|aMuleWeb FAQ]].
 
For further information read the [[FAQ_webserver|aMuleWeb FAQ]].

Revision as of 00:16, 13 November 2005

Description

AMuleWeb is a utility that listens for HTTP connections at port 4711 (by default, although it can be changed through Preferences) and allows remote users to control aMule using just a web browser.

aMule itself doesn't support listening to HTTP connections, so the external utility AMuleWeb is used. This utility listens for remote connections, and once the link between AmuleWeb and the remote user is established, it connects to the aMule main program using the External Connections mechanism.

Compiling aMuleWeb

Compile aMule normally, just add --enable-amuleweb whe nrunning configure.

Setting up Webserver with aMule

Webserver with aMule 2.0.0 or later

  • For users running the monotlithic aMule application:
    • Go to "Preferences"->"Remote Controls" (in aMule) and...
      • Enable "Accept External Connections".
      • Enable "Use TCP ports instead of unix local sockets" (This option doesn't exist since version 2.1.0)
      • Enter a password for External Connections. If you don't do this, aMuleWeb will not communicate with aMule.
NOTE: When you change your aMuleWeb and External Connections ports here, make sure to restart aMule.
  • For users running the aMule daemon:
    • Shutdown aMuled if it is still running.
    • Run amuleweb -w to generate ~/.aMule/remote.conf and edit it for these options. It previously were on ~/.aMule/amule.conf, but the lines are still on this file, so edit both if in doubt.
      • [ExternalConnect] <- Section header
      • AcceptExternalConnections=1 <-- To enable aMule listening for External Connections.
      • ECUseTCPPort=1 <-- To use the TCP port. Very important since Unix sockets are disabled.
      • ECPassword=ca3c365274907c6fd527068788e14639 <-- To find the MD5 string for your password, do:
$ echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1
ca3c365274907c6fd527068788e14639

NOTE: In aMule version 2.0.0 and later you don't need to do any copy/link of webserver files.

Thanks to Stefanero, from who I shamelessly stole a lot from his tutorial.

Webserver with aMule 2.0.0-rcX versions

  • Untar the sources and copy src/aMule.tmpl or in new versions (you are using a new version if you don't have the file aMule.tmpl in src/) only the following dir src/webserver/ into your ~/.aMule/ directory. The following (run from the sources directory), should do so:
$ cp -r src/aMule.tmpl src/webserver/ ~/.aMule/
  • If you installed aMule from rpm, then you can do:
$ cp /usr/share/amuleweb/aMule.tmpl ~/.aMule/
$ cp -r /usr/share/amuleweb/webserver/ ~/.aMule/
NOTE: Note that in current versions (since aMule 2.0.0) the above step is not necessary (in fact, it is incorrect).
  • Go to "Preferences"->"Remote Controls" (in aMule) and...
    • Enable "Accept External Connections".
    • Enable "Use TCP ports instead of unix local sockets".
    • Enter a password for external connections. If you don't do this, amuleweb will not communicate with amule.
NOTE: On some early aMule 2.0.0-rcX versions the above options weren't available (or didn't work). Use this if you want to run aMuled, too. If you are using such aMule version and you don't wish to upgrade, then do the following:
Shutdown aMule if it is still running.
Edit your ~/.eMule file, locate the [ExternalConnect] section and change:
AcceptExternalConnections=1 <-- To enable aMule listening for External Connections.
ECUseTCPPort=1 <-- To use the TCP port. Very important since Unix sockets are disabled.
ECPassword=ca3c365274907c6fd527068788e14639 <-- To find the MD5 string for your password, do:
$ echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1
ca3c365274907c6fd527068788e14639
NOTE: Since aMule 2.0.0 the ~/.eMule file is now called ~/.aMule/amule.conf.
  • Go to your "Preferences"->"Remote Controls" (in aMule) and setup your passwords here for External Connections and aMuleWeb login.
NOTE: When you change your aMuleWeb and External Connections ports here, make sure to restart aMule.
NOTE: that "Enable aMuleWeb" has no effect and will be renamed in 2.0.0rc8. aMuleWeb is always enabled as long as you have External Connections enabled.
NOTE: For users running aMule Daemon you have to edit the .eMule file like shown above. For a way to setup a password check the 1.2.8 aMule HowTo. You can still do it in the same way.
  • Now you're done! You are ready to run amuleweb and connect to it.

Stefanero

Webserver with aMule 1.2.8 or earlier

Read this article.

Connecting to amuleweb

To run aMuleWeb run amuleweb on a terminal.

Once aMuleWeb is running, open a web browser and connect to:

http://host:port

where host stands for your host's name (try with localhost) and port stands for the aMuleWeb port (NOT the External Connections port).

For example: http://localhost:4711

Standard ports

The ports can be set to anything, but this are the most used (the standard ones):

Make sure you do not confuse with what each of them is.

Skin support

aMuleWeb now looks for its files in a number of places:

  • In your home directory: $HOME/.aMule/webserver/[skin name]/
  • And at it's install location, in this order (by default, /usr/local/share/amule/webserver if you compiled aMule, or /usr/share/amule/webserver if you installed it from a package).

Default skin (template) name is 'default'.

If, after installing aMule, aMuleWeb refuses to run because of not being able to load template:

  • Please report this situation to us, and then
  • Create the directories webserver/default in the .aMule subdirectory of your home directory, and copy the contents of the src/webserver directory there from the aMule tarball (I mean to $HOME/.aMule/webserver/default).

GonoszTopi

Where to report problems and questions?

For Problems or Questions just report on http://forum.amule.org forum or join IRC channel #amule at irc.freenode.net

Other sources of information

Read the aMuleWeb man page, which is available in English, French, German, Hungarian and Spanish.

For further information read the aMuleWeb FAQ.