Difference between revisions of "Webserver"

From AMule Project FAQ
Jump to: navigation, search
Line 2: Line 2:
  
 
If you installed [[aMule]] via [http://www.debian.org deb] or [http://www.rpm.org RPM] package, the [[aMuleWeb|webserver]] source is not included.
 
If you installed [[aMule]] via [http://www.debian.org deb] or [http://www.rpm.org RPM] package, the [[aMuleWeb|webserver]] source is not included.
Since some few files are needed from the sources to set-up [[aMuleWeb]], please visit http://www.amule.org and download the tar.gz package for your [[aMule]] version.
+
Since some few files are needed from the sources to set-up [[aMuleWeb|amuleweb]], please visit http://www.amule.org and download the tar.gz package for your [[aMule]] version.
  
 
== Set a [[aMuleWeb|Webserver]] with [[aMule]] ==
 
== Set a [[aMuleWeb|Webserver]] with [[aMule]] ==
  
=== With [[aMule]] 2.0.0-rc1 or later ===
+
[[Webserver-1.2.x|Webserver with aMule 1.2.8 or earlier]]
  
*[http://www.gnu.org/software/tar/tar.html Untar] the sources and copy ''src/aMule.tmpl'' and ''src/webserver/'' into your ''~/.aMule/'' directory. The following (run from the sources directory), should do so:
+
=== Webserver with [[aMule]] 2.0.0-rc1 or later ===
 +
 
 +
*[http://www.gnu.org/software/tar/tar.html Untar] the sources and copy ''<b>src/aMule.tmpl</b>'' and ''<b>src/webserver/</b>'' into your ''<b>~/.aMule/</b>'' directory. The following (run from the sources directory), should do so:
 
:''cp -r src/aMule.tmpl src/webserver/ ~/.aMule/''
 
:''cp -r src/aMule.tmpl src/webserver/ ~/.aMule/''
  
Line 27: Line 29:
 
::'''NOTE:''' When you change your [[aMuleWeb|webserver]] and [[External Connections]] ports here, make sure to restart [[aMule]].
 
::'''NOTE:''' When you change your [[aMuleWeb|webserver]] and [[External Connections]] ports here, make sure to restart [[aMule]].
 
::'''NOTE:''' that ''"Enable [[aMuleWeb|Webserver]]"'' has no effect and will be renamed in 2.0.0rc8. [[aMuleWeb|Webserver]] is always enabled as long as you have [[External Connections]] enabled.
 
::'''NOTE:''' that ''"Enable [[aMuleWeb|Webserver]]"'' has no effect and will be renamed in 2.0.0rc8. [[aMuleWeb|Webserver]] 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 [[#With_aMule_1.2.8_or_earlier|1.2.8 aMule HowTo]]. You can still do it in the same way.
+
::'''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.
+
*Now you're done! You are ready to run [[aMuleWeb|amuleweb]] and connect to it.
  
 
'''[[User:Stefanero|Stefanero]]'''
 
'''[[User:Stefanero|Stefanero]]'''
  
=== With [[aMule]] 1.2.8 or earlier ===
+
== Connecting to [[aMuleWeb|amuleweb]] ==
 
+
The following is based on the original instruction by BigBob. They guide you on how to modify [[aMule]]'s configuration files to set [[aMuleWeb]] correctly. There is "Preferences"->"Remote Controls" now, but anyway, information is never a bad idea.
+
 
+
*Shutdown [[aMule]] to avoid overwritting config files while shutting down.
+
 
+
*Copy from [[aMule]]'s sources (version 1.2.4 or later) the directory ''src/webserver/'' into your ''~/.aMule/webserver/'' directory.
+
 
+
*Copy from [[aMule]]'s sources (version 1.2.4 or later) the file ''src/aMule.tmpl'' into your ''~/.aMule/aMule.tmpl'' directory.
+
 
+
*Open a terminal and type (you might have to install ''[http://www.delorie.com/gnu/docs/textutils/md5sum.1.html md5sum]''):
+
 
+
:''echo -n "'''THEPASWORDYOUWANT'''" | md5sum | cut -d " " -f 1''
+
:This command will reply with an [[MD4 hash|MD5 hash]]. Something like: 324f85f6095f9e5fe25b6c85af44b445
+
 
+
*Edit your ''~/.eMule'' file, locate the ''[ExternalConnect]'' section in it and change this fields:
+
 
+
:''AcceptExternalConnections=1'' <- To enable [[aMule]] to listen for [[External Connections]].
+
:''ECUseTCPPort=0'' <- 0/1 (disable/enable) the use of a [http://www.faqs.org/faqs/internet/tcp-ip/resource-list TCP] port (if disabled use a [http://www.unix.org Unix] socket in your ''~/.aMule/muleconn'') for [[External Connections]].
+
:''ECPort=4712'' <- Put here the port on which you want [[aMule]] to listen for [[External Connections]].
+
:''ECPassword=39e5049d0614baf21906500e2261d500'' <- Put here the password for [[External Connections]]<nowiki>'</nowiki> authentications you generated before in terminal (something like 324f85f6095f9e5fe25b6c85af44b445).
+
 
+
*Edit your ''~/.eMule'' file, locate the ''[WebServer]'' section in it and change fields:
+
 
+
:''Password=324f85f6095f9e5fe25b6c85af44b445'' <- Put here the password generated with [http://www.delorie.com/gnu/docs/textutils/md5sum.1.html md5sum] for the admin (full privileged users).
+
:''PasswordLow=1db5a746266e941b3ef7dd3586863ca7'' <- Put here the password generated with [http://www.delorie.com/gnu/docs/textutils/md5sum.1.html md5sum] for "low users" (low privileged users).
+
:''Port=10000'' <- Put the port you want [[aMuleWeb]] to listen on.
+
:''Enabled=1'' <- This option has been deprecated and is completly ignored now. Enabling External Connections will enable any application it connects to it, including [[aMuleWeb]].
+
:''UseGzip=1'' <- Enable compression on communication.
+
:''PageRefreshTime=120'' <- Put here the web page refresh time (in seconds).
+
:''UseLowRightsUser=0'' <- 0/1 (disabled/enabled) "low user" access.
+
 
+
*Restart [[aMule]].
+
 
+
*Once [[aMule]] is running, start the web interface ([[aMuleWeb]]).
+
 
+
*Now point your web browser to http://localhost:10000 (or whatever your host and ports are) and authenticate yourself with "Password" (for full privileged user) or "PasswordLow" (for low privileged user, if enabled).
+
 
+
*That's all :)
+
 
+
:'''NOTE:'' In latest [[aMule]] 1.2.x releases, the option ''WebTemplateFile'' allows to override the file template to use (thanks to [[User:Stefanero|Stefanero]]. You can set this option in the ''[eMule]]'' section. Example:
+
 
+
:''WebTemplateFile=eMule.tmpl''
+
 
+
''Shakraw''
+
 
+
== Connecting to [[aMuleWeb]] ==
+
  
To run [[aMuleWeb]] run ''amuleweb'' on a terminal. For more information about running [[aMuleWeb]] check the [[aMuleWeb|aMuleWeb document]].
+
To run [[aMuleWeb]] run ''<b>amuleweb</b>'' on a terminal. For more information about running [[aMuleWeb]] check the [[aMuleWeb|aMuleWeb document]].
  
 
Once [[aMuleWeb]] is running, open a web browser and connect to:
 
Once [[aMuleWeb]] is running, open a web browser and connect to:
Line 96: Line 52:
  
 
*[[External Connections]]: 4712
 
*[[External Connections]]: 4712
*[[aMuleWeb]]: 4711
+
*[[aMuleWeb|amuleweb]]: 4711
  
 
Make sure you do not confuse with what each of them is.
 
Make sure you do not confuse with what each of them is.

Revision as of 01:28, 5 January 2005

Previous notes

If you installed aMule via deb or RPM package, the webserver source is not included. Since some few files are needed from the sources to set-up amuleweb, please visit http://www.amule.org and download the tar.gz package for your aMule version.

Set a Webserver with aMule

Webserver with aMule 1.2.8 or earlier

Webserver with aMule 2.0.0-rc1 or later

  • Untar the sources and copy src/aMule.tmpl and src/webserver/ into your ~/.aMule/ directory. The following (run from the sources directory), should do so:
cp -r src/aMule.tmpl src/webserver/ ~/.aMule/
  • Go to "Preferences"->"Remote Controls" (in aMule) and...
    • Enable "Accept External Connections".
    • Enable "Use TCP ports instead of unix local sockets".
NOTE: On some early aMule 2.0.0-rcX versions the above two options weren't available (or didn't work). 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.
NOTE: When you change your webserver and External Connections ports here, make sure to restart aMule.
NOTE: that "Enable Webserver" has no effect and will be renamed in 2.0.0rc8. Webserver 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

Connecting to amuleweb

To run aMuleWeb run amuleweb on a terminal. For more information about running aMuleWeb check the aMuleWeb document.

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.

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