BeagleBone Black web server

4,788 views
Skip to first unread message

Michael Thompson

unread,
Jun 7, 2014, 1:07:15 AM6/7/14
to beagl...@googlegroups.com
I flashed Debian to the eMMC and it seems to be working fine. My plan is to host a small web page using Apache. I installed Apache and using the IP address the BeagleBone 101 loads fine from outside my network.

So, my question is, in what directory do I save my index.html file in order to see it as the default page served by Apache? There are no files in the /var/www/ directory so I am confused. On my Linux Mint (Debian edition) all I had to do was save my index file in the www directory.

Anyone know where I am going wrong?

Thanks!!

Eric Fort

unread,
Jun 7, 2014, 6:06:47 AM6/7/14
to beagleboard
Where does httpd.conf say your files should go?


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jay Nugent

unread,
Jun 7, 2014, 7:02:37 AM6/7/14
to beagleboard
Greetings,

On Sat, 7 Jun 2014, Eric Fort wrote:

> Where does httpd.conf say your files should go?
>
>
> On Fri, Jun 6, 2014 at 10:07 PM, Michael Thompson <
> thompsonm...@gmail.com> wrote:
>
>> I flashed Debian to the eMMC and it seems to be working fine. My plan is
>> to host a small web page using Apache. I installed Apache and using the IP
>> address the BeagleBone 101 loads fine from outside my network.
>>
>> So, my question is, in what directory do I save my index.html file in
>> order to see it as the default page served by Apache? There are no files in
>> the /var/www/ directory so I am confused. On my Linux Mint (Debian edition)
>> all I had to do was save my index file in the www directory.


Typically /var/www/html/<user-name>/index.html

...which can be reached with http://hostname.domain.tld/user-name


-or-

/home/user-name/public_html/index.html

...which can be reached with http://hostname.domain.tld/~user-name


--- Jay Nugent WB8TKL
Ypsilanti, Michigan

Li926744

unread,
Jun 7, 2014, 7:32:19 AM6/7/14
to beagl...@googlegroups.com
Apache on arm is not a too good option try lighthttpd ?

Michael Thompson <thompsonm...@gmail.com>编写:

I flashed Debian to the eMMC and it seems to be working fine. My plan is to host a small web page using Apache. I installed Apache and using the IP address the BeagleBone 101 loads fine from outside my network.

So, my question is, in what directory do I save my index.html file in order to see it as the default page served by Apache? There are no files in the /var/www/ directory so I am confused. On my Linux Mint (Debian edition) all I had to do was save my index file in the www directory.

Anyone know where I am going wrong?

Thanks!!

Don deJuan

unread,
Jun 7, 2014, 8:20:11 AM6/7/14
to beagl...@googlegroups.com
darkhttpd and nginx are also good alternatives as well as a few others.

William Hermans

unread,
Jun 7, 2014, 11:38:01 AM6/7/14
to beagl...@googlegroups.com
Apache on arm is not a too good option try lighthttpd ?


Really ? Care to enlighten us as to why Apache on ARM is no good ?

Michael Thompson

unread,
Jun 7, 2014, 5:50:30 PM6/7/14
to beagl...@googlegroups.com, eric...@gmail.com
I don't know where the httpd.conf file is located :(

Jay Nugent

unread,
Jun 7, 2014, 6:00:12 PM6/7/14
to beagl...@googlegroups.com, eric...@gmail.com
Greetings,

On Sat, 7 Jun 2014, Michael Thompson wrote:

> I don't know where the httpd.conf file is located :(

Typically httpd.conf is located in /etc. But if you install apache, it
may be /etc/apache/httpd.conf or /etc/httpd/httpd.conf

You can always use the 'find' command to locate files:

find / -name httpd.conf


--- Jay Nugent WB8TKL
Ypsilanti, MI

Michael Thompson

unread,
Jun 7, 2014, 6:38:39 PM6/7/14
to beagl...@googlegroups.com, eric...@gmail.com
I spent a long time digging around in a bunch of directories. I couldn't find httpd.conf in any apache directories, the one you mentioned included. I also don't even have an /etc/httpd directory. And the find command (which I didn't know about, so thank you!) returned nothing.

I am thoroughly confused at the point.

Janek

unread,
Jun 8, 2014, 1:26:44 AM6/8/14
to beagl...@googlegroups.com
Hi,

 Don't know about Debian, but if with default Angstrom image, you have to either stop the nodejs webserver or
use a different port (192.168.7.2:port, where port is your port number) if you use another webserver as well.

Jan

William Hermans

unread,
Jun 8, 2014, 3:21:04 PM6/8/14
to beagl...@googlegroups.com
The first hit for me ( stackoverflow ) shows you how to search your system to find a file.


--

William Hermans

unread,
Jun 8, 2014, 3:23:47 PM6/8/14
to beagl...@googlegroups.com
Micheal while you're at it, try . ..

# which apache


And let us know what your shell outputs. Just incase there is any confusion, the above command is issued as root, or regular user using sudo.

John Syn

unread,
Jun 8, 2014, 7:23:43 PM6/8/14
to beagl...@googlegroups.com

From: William Hermans <yyr...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Saturday, June 7, 2014 at 8:37 AM
To: <beagl...@googlegroups.com>
Subject: Re: [beagleboard] BeagleBone Black web server

Apache on arm is not a too good option try lighthttpd ?
I haven’t used Apache much, but my understanding is that Apache uses a thread per connection which sucks up resources pretty quickly and doesn’t scale very well. This is the reason why Node.js is preferred because it is single threaded and uses asynchronous I/O so it scales so much better. Given the limited resources on the BBB, Node.js is able to support >100x connections compared to Apache. I don’t know much about Lighthttpd. 

Regards,
John

William Hermans

unread,
Jun 8, 2014, 9:42:36 PM6/8/14
to beagl...@googlegroups.com
That does not answer why Apache is no good for "ARM". To be perfectly frank. The original statement was subjective at best. Apache may not be the best choice for the Beaglebone, but if Apache works fine for the user using it. There is nothing wrong with it.

Personally, I prefer Node.js to any of the other offerings, but the OP did not ask which was the best web server option. He / She asked where the www root should be for Apache using Debian on the Beaglebone black( or something to that effect ).

liyaoshi

unread,
Jun 8, 2014, 9:47:10 PM6/8/14
to beagl...@googlegroups.com
Use Default Apache Benchmark within Ubuntu 12.04 on PC

See attatch test log file 

In static page case , Apache never wins,as I know 
apacheVSlighttpd2000.txt
apacheVSlighttp_1000.log
Machine info.txt

William Hermans

unread,
Jun 8, 2014, 10:05:59 PM6/8/14
to beagl...@googlegroups.com
And, I bet Node.js will "smoke" them both. Which still has nothing to do with the OP's question.

Simon Platten

unread,
Jun 9, 2014, 5:41:05 AM6/9/14
to beagl...@googlegroups.com
Node.js is far better than Apache, ok Apache and other web-servers are a bit easier to implement a web-server out of the box, but node.js is so much faster and using the same language on the server and client makes life easier.  It's worth sticking with node.js.


On Monday, 9 June 2014 03:05:59 UTC+1, William Hermans wrote:
And, I bet Node.js will "smoke" them both. Which still has nothing to do with the OP's question.
On Sun, Jun 8, 2014 at 6:46 PM, liyaoshi <liya...@gmail.com> wrote:
Use Default Apache Benchmark within Ubuntu 12.04 on PC

See attatch test log file 

In static page case , Apache never wins,as I know 
2014-06-09 7:23 GMT+08:00 John Syn <john...@gmail.com>:

From: William Hermans <yyr...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Saturday, June 7, 2014 at 8:37 AM
To: <beagl...@googlegroups.com>
Subject: Re: [beagleboard] BeagleBone Black web server

Apache on arm is not a too good option try lighthttpd ?
I haven’t used Apache much, but my understanding is that Apache uses a thread per connection which sucks up resources pretty quickly and doesn’t scale very well. This is the reason why Node.js is preferred because it is single threaded and uses asynchronous I/O so it scales so much better. Given the limited resources on the BBB, Node.js is able to support >100x connections compared to Apache. I don’t know much about Lighthttpd. 

Regards,
John


Really ? Care to enlighten us as to why Apache on ARM is no good ?
On Sat, Jun 7, 2014 at 5:19 AM, Don deJuan <donju...@gmail.com> wrote:
darkhttpd and nginx are also good alternatives as well as a few others.

On 06/07/2014 04:19 AM, Li926744 wrote:
Apache on arm is not a too good option try lighthttpd ?

Michael Thompson <thompson...@gmail.com>编写:

Michael Thompson

unread,
Jun 16, 2014, 8:57:04 PM6/16/14
to beagl...@googlegroups.com
So I gave up on my Debian install and downloaded a Ubuntu image and installed that. Upon startup I found the image does not have a GUI so I decided to not even mess with that either (I'll get there someday) so I downloaded a new Debian ISO and was hoping that a fresh install would fix my previous issue. But now my MD5SUM doesn't match what is on the latest images page. Dang!

I'm going to start a new thread that is relevant to this new issue!

Thanks for all the ideas, guys :)

crazybucket

unread,
Jun 17, 2014, 12:54:22 AM6/17/14
to beagl...@googlegroups.com
You do use the /var/www directory for apache. The problem, as someone else mentioned, is that there is another webserver running on it out of the box, so you need to disable it and the associated mess with systemctl:

systemctl disable cloud9.service
systemctl disable gateone.service
systemctl disable bonescript.service
systemctl disable bonescript.socket
systemctl disable bonescript-autorun.service
systemctl disable avahi-daemon.service
systemctl disable gdm.service
systemctl disable mpd.service

Now we can use the beaglebone more like a headless linux machine. Last time I played with it, apache was already installed (!) but running on an alternate port. So lets fix that - open /etc/apache2/ports.conf and change this: 

NameVirtualHost *:8080 
Listen 8080

to this:

NameVirtualHost *:80
Listen 80

Save it and restart apache:

apachectl graceful

Then you should see the "It works!" page by navigating to the beaglebone's IP address. Apache runs just fine on the beaglebone - much faster than the pentium II that I used to to learned linux on...
Message has been deleted

Michael Thompson

unread,
Jun 17, 2014, 11:15:21 AM6/17/14
to beagl...@googlegroups.com
This didn't work either. I am losing all hope that I will ever get this thing to work. I guess I will try again later today and maybe some magic will happen.

William Hermans

unread,
Jun 17, 2014, 11:19:52 AM6/17/14
to beagl...@googlegroups.com
It might be helpful if you told us why it does not work.


--

Michael Thompson

unread,
Jun 17, 2014, 11:24:21 AM6/17/14
to beagl...@googlegroups.com
Yeah, that's why I am going to retry it later today. I followed the last instructions before I left for work and didn't keep notes on which steps failed and why. I am going to start from a fresh install this afternoon and keep track of what happens so that I will be able to give more detail instead of just posting a dejected "Nothing works!!" reply. Sorry for being whiney, I'm just getting frustrated :(

William Hermans

unread,
Jun 17, 2014, 11:44:50 AM6/17/14
to beagl...@googlegroups.com
Micheal,

The best solution IMHO would be to start with a minimal or bare filesystem, and install *only* the packages that you need. But this means you're going to have to take time and learn how to do so. Using these instructions: http://eewiki.net/display/linuxonarm/BeagleBone+Black You would skip anything related to compiling / copying over the kernel or u-boot and do something like the following
 . . .

1) remove the rootfs partition on the sdcard.
2) create a new partition on the sdcard.
3) extract the barefs rootfs image onto this new partition.
4) follow the directions for modifying configuration file on the newly extracted rootfs so Debian knows how to behave.
5) once logged into the new system su to root, and apt-get install what you need.

*NOW* do keep in mind it is rather early for me ( have not had my morning coffee so to speak ), and I have not personally tested, or given this much thought aside from the occasional musing. So I may not have remembered *EVERYTHING*. However this is the gist of how to achieve what I propose.

Eventually though, you're going to have to get your hands dirty and learn this stuff. Maybe not for this project, but perhaps for another. You may as well start learning now.

Michael Thompson

unread,
Jun 17, 2014, 12:05:45 PM6/17/14
to beagl...@googlegroups.com
Hi William, I have actually been reading about how to do a netinstall all morning. Never a better time than now to learn something useful, right? I think I may give this a go in the next few days. Thanks for the advice :)

Wilfredo Nieves

unread,
Jun 17, 2014, 7:45:55 PM6/17/14
to beagl...@googlegroups.com

In all honesty I don't think you have to disable the default web server. A few months back I picked up a my book live nas and cracked it open to find that the hardware was similar to BBB. So I decided to see if I could do something similar with the BBB and I got it working but I don't remember having to disable the default web server. I may be wrong though as I did not take notes on the procedure because I figured it was a one time deal and did it just to see if it could be done. Any ways all I remember doing was following a guide to install open cloud on debian. So you may want to look at some of those guides and see if you can get your web server working.

Wilfredo Nieves

unread,
Jun 17, 2014, 8:01:54 PM6/17/14
to beagl...@googlegroups.com

Correction it was OwnCloud not open cloud.

mark

unread,
Nov 9, 2015, 9:03:03 AM11/9/15
to BeagleBoard
I too was looking where to simply put my html so my BBB would be a web server.  I didn't want to have to install a new server or anything and have to disable the old one.  Turns out, for me at least, it's quite simple.

 have a rev C Beaglebone Black with "Debian Image 2015-03-01" "using linux kernel 3.8.13-bone70"

I put index.html in :/var/www and I can see it on my laptop by browsing to http://192.168.7.2:8080/
Reply all
Reply to author
Forward
0 new messages