Difference between revisions of "Webserver"

From AMule Project FAQ
Jump to: navigation, search
m (more general)
Line 15: Line 15:
 
1) Shutdown your [[aMule]] if it is still running
 
1) Shutdown your [[aMule]] if it is still running
  
2) Edit your ''.eMule'' file: (located in $HOME)
+
2) Edit your ''~/.eMule'' file:
 
*Locate the ''[ExternalConnect]'' section and change:
 
*Locate the ''[ExternalConnect]'' section and change:
 
**''AcceptExternalConnections=1'' <-- To enable [[aMule]] listening for [[External Connections]]
 
**''AcceptExternalConnections=1'' <-- To enable [[aMule]] listening for [[External Connections]]

Revision as of 19:27, 1 October 2004

How to setup a Webserver with aMule 2.0.0rc1 and later:

When you installed your aMule via deb package or rpm, the webserver source is not included. Please visit http://www.amule.org and download the tar.gz package for your aMule version.


SETUP

0) Untar it and copy from the src directory:

into your /home/usr_running_aMule/.aMule/ directory.

1) Shutdown your aMule if it is still running

2) 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

3) Restart aMule

4) Go to your Preferences -> Remote Connection (in aMule):

5) After you are done, save your settings, go to console and type

at the end it should look something like this: Web Server: Started

amuleweb$

WSThread: Thread started

WSThread: created service

WSThread: created socket listening on :4711

6) To make sure it is working use your favorite browser to browse:

NOTE: This (port 4711) is the default port of your aMuleWeb. If you connect to 4712 this will not work since it is the External Connections port, so connecting here will result in error messages by aMule.

NOTE: Since aMule 2.0.0-rc6, aMuleWeb supports --quiet switch (or -q also) which renders allows aMuleWeb to be easily run on the background.
However, on previous aMule releases, although aMuleWeb works well, it's actually quite tricky to run it in the background because it's continuously asking for user commands and showing the prompt. The obvious way to avoid this would be running amuleweb with the output redirected to /dev/null, but this hogs the CPU due to the constant writing, so a better approach is to use the program screen, which is a terminal emulator. In order to run aMuleWeb inside a virtual terminal, the following command should be executed: screen -d -m -S amulewebsession amuleweb -p 7000 -pw password (assuming that aMule is listening for External Connections on port 7000 and the password is password). Then, aMuleWeb will start listening for HTTP connections, but will show the prompt and all messages in this virtual terminal. It's possible to switch to this terminal using the command screen -r amulewebsession, please refer to screen documentation for info about session switching, internal commands, etc.

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


Stefanero