WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Anyone interested in testing an aria2 webUI?  (Read 17589 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Anyone interested in testing an aria2 webUI?
« on: March 16, 2012, 05:34:17 PM »
I've been working on a light webUI for aria2, for remotely controlling downloads.

Anyone interested in testing?

http://a2web.sourceforge.net

Quick install on busybox httpd:
Quote
tce-load -wi compiletc aria2 fcgi fcgi-dev xmlrpc-c-client
make
mkdir -p ~/www
COPYDIR=~/www make copy
cp a2web.conf.sample ~/www/cgi-bin/a2web.conf # set the theme path as "/a2web/crystal", busybox doesn't like regular files under cgi-bin
httpd -f -p 8080 -h ~/www
The only barriers that can stop you are the ones you create yourself.

Offline ndrancs

  • Newbie
  • *
  • Posts: 34
  • I Love Linux
Re: Anyone interested in testing an aria2 webUI?
« Reply #1 on: March 17, 2012, 02:31:41 AM »
hi curaga
how to setup with lighttpd.tcz ?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #2 on: March 17, 2012, 04:12:10 AM »
I don't have my test setup at hand right now, but you need to add "mod_cgi" to the server modules, and assign .cgi to nothing:

Quote
$HTTP["url"] =~ "^/cgi-bin" {
    cgi.assign = ( ".cgi" => "" )
}

Note this is the CGI setup, I haven't tested FastCGI with lighttpd.
The only barriers that can stop you are the ones you create yourself.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #3 on: March 27, 2012, 08:40:55 AM »
a2web.tcz now posted.

Busybox httpd instructions shorten to:
Quote
tce-load -wi a2web
# edit config file as needed
httpd -f -p 8080 -h /usr/local/share/a2web

I also tested lighttpd FastCGI, seems there's a bug in lighttpd's passing of SCRIPT_NAME (it passes it fine in CGI mode) or in libfcgi. Not too interested in tracking that down ATM, so lighttpd users please use the CGI mode.
The only barriers that can stop you are the ones you create yourself.

Offline ndrancs

  • Newbie
  • *
  • Posts: 34
  • I Love Linux
Re: Anyone interested in testing an aria2 webUI?
« Reply #4 on: March 27, 2012, 08:48:24 AM »
Hi Curaga,

I will test the extension and report the result here,

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #5 on: April 07, 2012, 05:27:49 AM »
I have found the bug in fastcgi. It was in libfcgi's printf. The fixed packages haven't been uploaded yet, I'll ask danielibarnes first.

Here's an example lighttpd conf, in fastcgi mode:
Quote
server.document-root = "/usr/local/share/a2web"
server.port = 80

server.modules = ( "mod_access", "mod_fastcgi" )

server.username = "nobody"
server.groupname = "nogroup"

server.errorlog = "/tmp/light.log"



mimetype.assign = (
         ".css" => "text/css",
         ".js" => "text/javascript",
         ".png" => "image/png" )

fastcgi.server = ( ".cgi" =>
      (( "bin-path" =>
         "/usr/local/share/a2web/cgi-bin/a2web.cgi",
         "socket" => "/tmp/a2.socket"
      ))
      )
The only barriers that can stop you are the ones you create yourself.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #6 on: April 09, 2012, 03:05:56 AM »
fcgi.tcz is updated, fastcgi should work with all supporting servers.
The only barriers that can stop you are the ones you create yourself.

Offline ndrancs

  • Newbie
  • *
  • Posts: 34
  • I Love Linux
Re: Anyone interested in testing an aria2 webUI?
« Reply #7 on: May 01, 2012, 11:06:16 PM »
hi curaga,
i have tested a2web.tcz and found no problem so far,
thanks

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Anyone interested in testing an aria2 webUI?
« Reply #8 on: August 02, 2012, 11:30:53 AM »
i tried to run a2web under xampp
Code: [Select]
Firefox can not connect to server localhost:6800i stopped xampp, installed busybox httpd and did as adviced here
Busybox httpd instructions shorten to:
Quote
tce-load -wi a2web
# edit config file as needed
httpd -f -p 8080 -h /usr/local/share/a2web
Code: [Select]
# set a2web.conf
sudo /usr/local/httpd/bin/httpd -f -p 8080 -h /usr/local/share/a2web
firefox http://localhost:6800/rpc
but result is the same
Code: [Select]
Firefox can not connect to server localhost:6800most likely my hands are growing from other side :D
probably it would be easier for me to build something with gui from here
http://sourceforge.net/directory/freshness:recently-updated/?q=aria2
this is reason why i sometimes use fatrat ::)
« Last Edit: August 02, 2012, 11:32:58 AM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #9 on: August 02, 2012, 12:26:41 PM »
6800/rpc is where aria2 is running, you should point firefox to 8080, where a2web is running ;)

"firefox localhost:8080"
The only barriers that can stop you are the ones you create yourself.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Anyone interested in testing an aria2 webUI?
« Reply #10 on: August 02, 2012, 11:04:26 PM »
i made the following
Code: [Select]
sudo cp -f /usr/local/share/a2web/a2web.conf.sample /usr/local/share/a2web/cgi-bin/a2web.conf
sudo cp -f /usr/local/share/a2web/a2web /usr/local/share/a2web/cgi-bin
sudo sed -i "5,6s/^# //" /usr/local/share/a2web/cgi-bin/a2web.conf
su ${TCUSER=`cat /etc/sysconfig/tcuser`} -c "aria2c --enable-rpc"
sudo /usr/local/httpd/sbin/httpd -f -p 8080 -h /usr/local/share/a2web -u $TCUSER:staff
as result i get 404
Code: [Select]
firefox http://localhost:8080http://pastehtml.com/view/c6xeioq1o.html
or desired a2web but without theming
Code: [Select]
firefox http://localhost:8080/cgi-bin/a2web.cgi
i again did something wrong?
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #11 on: August 03, 2012, 07:24:56 AM »
Sorry, I occasionally assume too much. Here's a step by step, for the busybox httpd extension. Note the config file editing is not necessary for other web servers.

Pre-step: Run aria2 --enable-rpc, maybe from a boot script.

1. tce-load -wi a2web busybox-httpd
2. cd /usr/local/share/a2web/cgi-bin
3. sudo cp ../a2web.conf.sample a2web.conf
4. Uncomment the themedir path and add a / (just like in the first post, /a2web/crystal)
5. firefox localhost:8080/cgi-bin/a2web.cgi

edit: Your current setup only misses making the theme path absolute, ie add a / to the theme path's start.
The only barriers that can stop you are the ones you create yourself.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Anyone interested in testing an aria2 webUI?
« Reply #12 on: August 11, 2012, 04:25:29 PM »
here i wrote daemon a2webd for a2web
Code: [Select]
Usage: a2webd [start|status|reload|restart|stop]this script examines configuration files
a2webd.conf, aria2.conf (if exists)
and a2web.conf (or creates it if does not exist)
then starts aria2 if not running another instance
and starts busybox httpd with a2web.cgi
if can't find already running a2web.cgi
on another already configured http server
more details as it works is specified in comments

a2webd has configuration file a2webd.conf
which created with default options
at first start if did not exist before
Code: [Select]
# a2web.conf

# path = /path/to/a2web.cgi
path = /usr/local/share/a2web/cgi-bin/a2web.cgi

# uri = [http://][[password:]user@]server[:port]/path-to/a2web.cgi
uri = http://localhost:8080/cgi-bin/a2web.cgi
options should be changed on your own
(such as user and password for http auth)
to launch busybox httpd with a2web.cgi
or according to already running on other server

i tested and seems it work well
maybe you look how it works
and consider its inclusion to extension a2web.tcz
or maybe also to a2web distribution if it can be applied
« Last Edit: August 11, 2012, 04:27:01 PM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Anyone interested in testing an aria2 webUI?
« Reply #13 on: August 11, 2012, 05:21:59 PM »
a2web.tcz, a2web - sure, I can add it.

I see that you check the aria2 conf file for the dir option, and pass it on the command line too. Why? Is there some bug in aria2 that prevents the dir option in the config file from working?
The only barriers that can stop you are the ones you create yourself.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Anyone interested in testing an aria2 webUI?
« Reply #14 on: August 11, 2012, 08:56:11 PM »
indeed most likely that there i'm reinsured :)
i think that aria2 has no such error
i'll check this and most likely this can be removed

and when i rode to home then i thought
that not very well written search for path to busybox httpd
if this will applied for different linux distributions
i'll work with all this tonight and upload corrected version

i also thought how would better
automatically define prefix variable
rather than set it tough...

also i still can't imagine universal method
to user determining for different linux distributions
and if nothing will come to mind then so far leave it as is
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)