tvpad2 as http web server

erdoserdos Junior Member
edited September 2016 in Legacy TVPad
i've successfully setup tvpad2 as a http web server.

since tvpad2's operating system is based on busybox, there's a web server daemon already included in busybox and it can be started from command line.

here's the procedures:

1. telnet into the tvpad2 as 'root', navigate to 'program' directory.
# cd /program

2. start http web server by typing:
# httpd

3. then use 'vi' editor to build your own webpage:
# vi index.html

a simple example of contents of index.html would be:


hello from busybox...



4. find out ip address of tvpad in your home network, then open an web browser on your computer, type 'http://yourTvpad'sIPAddress/' (for example http://192.168.1.16/ where 192.168.1.16 being the ip address of tvpad.) to test it.

if you want to access the http web server from anywhere on the web, you can set Port Forwarding the webserver service (usually port 80) on your home router. and type from anywhere on the web:
http://yourIPAddress/ (i.e. http://12.345.67.890/).

above should work for tvpad1/3 as well (you can test it by typing 'busybox' on the command line, check whether 'httpd' is listed on the resultant list, then it does then good to go). i tested on tvpad2 since that what i have.
Post edited by padman on
Thanked by 1padman

Comments


  • could u make a youtube that we can learn it?
  • Hi,

    As expected, the TVPad3 can also be enabled as an HTTP Server.

    In my case; what I did, was to add the command to start the httpd daemon in a line inside the sh script I use to root the tvpad (the sh script named gvos2-sd1 I have in the USB drive).

    In my case, I decided to put the html files inside their own directory under programs. The complete path to the html files I have is /programs/www/html

    Inside the gvos2-sd1 script I put the line:
    /usr/sbin/httpd -h /programs/www/html

    That way, when the tvpad starts, it will automatically load the httpd daemon, with the home directory path /programs/www/html (the place where the html files are located by default).

    My next step will be to add an httpd.conf file to the www directory and change the startup line to read "/usr/sbin/httpd -c /programs/www/httpd.conf". That way, I will be able to have more configuration options for the web server using the httpd.conf file.

    Thanks,


    fadiaz
Sign In or Register to comment.