Difference between revisions of "FAQ webserver"

From AMule Project FAQ
Jump to: navigation, search
Line 9: Line 9:
 
== How can I setup [[aMuleWeb]] with [[aMule]] v1? ==
 
== How can I setup [[aMuleWeb]] with [[aMule]] v1? ==
  
Read [http://www.amule-project.net/amule/thread.php?threadid=678 this], but be aware that using [[aMule]] v2 is '''recommended'''.
+
Read [[Webserver|this HowTo]], but be aware that using [[aMule]] v2 is '''recommended''' and that [[aMule]] v1's [[aMuleWeb]] has some security bugs.
  
== Why is [[aMuleWeb]] fails to connect? ==
+
== What should I see when [[aMuleWeb]] is running correctly? ==
  
If you followed the above HowTos (the appropiate one depending on your [[aMule]] version) correctly, make sure that you are using an [[aMuleWeb]] binnary distributed with the same release as the [[aMule]] binnary.<br>
+
After running ''amuleweb'' in a terminal, you should see something like this:
This means that [[aMuleWeb]] binnary from the [[aMule]] 2.0.0-rc3 release will '''not''' connect with [[aMule]] 2.0.0-rc4, [[aMule]] 2.0.0-rc2 or any other version (including v1 versions).
+
 
 +
:''Web Server: Started''
 +
 
 +
:''WSThread: Thread started''
 +
 
 +
:''WSThread: created service''
 +
 
 +
:''WSThread: created socket listening on :4711''
 +
 
 +
:''amuleweb$''
 +
 
 +
== Can I run [[aMuleWeb]] as a daemon? ==
 +
 
 +
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 [http://directory.fsf.org/GNU/screen.html 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 [http://directory.fsf.org/GNU/screen.html screen] documentation for info about session switching, internal commands, etc.
 +
 
 +
==  Why is [[aMuleWeb]] failing to connect? ==
 +
 
 +
If you followed the [[Webserver|above HowTo]] correctly, make sure that you are using an [[aMuleWeb]] binnary distributed with the same release as the [[aMule]] binnary. For example, [[aMuleWeb]] binnary from the [[aMule]] 2.0.0-rc3 release will '''not''' connect with [[aMule]] 2.0.0-rc4, [[aMule]] 2.0.0-rc2 or any other version (including v1 versions).

Revision as of 23:55, 11 November 2004

What is aMuleWeb?

Take a look at this.

How can I setup aMuleWeb with aMule v2?

To configure it, please follow this HowTo.

How can I setup aMuleWeb with aMule v1?

Read this HowTo, but be aware that using aMule v2 is recommended and that aMule v1's aMuleWeb has some security bugs.

What should I see when aMuleWeb is running correctly?

After running amuleweb in a terminal, you should see something like this:

Web Server: Started
WSThread: Thread started
WSThread: created service
WSThread: created socket listening on :4711
amuleweb$

Can I run aMuleWeb as a daemon?

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.

Why is aMuleWeb failing to connect?

If you followed the above HowTo correctly, make sure that you are using an aMuleWeb binnary distributed with the same release as the aMule binnary. For example, aMuleWeb binnary from the aMule 2.0.0-rc3 release will not connect with aMule 2.0.0-rc4, aMule 2.0.0-rc2 or any other version (including v1 versions).