Build Image with APACHE2

Hi,

I have ccimx6ulsbc dev board with dey2.2r2 yocto
I added apache2 package as
PACKAGECONFIG_append = “apache2”
The image installed without /etc/httpd/httpd.conf
I created one httpd.conf and run httpd as
httpd -h /home/www -c /etc/httpd/httpd.conf

I found any line added into the httpd.conf causing error: config error

I don’t know that append apache2 will automatically include php, python, mysql, and perl or not.

I was be able to append php, python, mysql, and apache2, but not perl package, which will cause bitbake error.

The webserver (httpd) runs, but without httpd.conf. I cannot include a simple httpd. What is missing?

Thank you,

David Zhou

you need to add appache as a yocto layer:
https://stackoverflow.com/questions/23094113/build-yocto-image-with-apache2

Hi Leonid,

Thank you for taking your time to answer my question.

I just added PACKAGECONFIG_append =“apache2”
It needs IMAGE_INSTALL_append =“apache2”, too.
I haven’t test yet, but I think this is the problem.

Thank you.
David Zhou

Hi David,

Its as simple as adding the following line in your local.conf file:

#Web hosting services

CORE_IMAGE_EXTRA_INSTALL += " apache2"
#CORE_IMAGE_EXTRA_INSTALL += " php"
#CORE_IMAGE_EXTRA_INSTALL += " sqlite3"
#CORE_IMAGE_EXTRA_INSTALL += " nodejs"
#CORE_IMAGE_EXTRA_INSTALL += " nodejs-npm"
#CORE_IMAGE_EXTRA_INSTALL += " packagegroup-core-buildessential"
#CORE_IMAGE_EXTRA_INSTALL += " openssh-sftp-server"

I’ve added extra lines you can optionally remove the ‘#’ to build in support for more advanced web pages. With this, i’ve been able to build an image and test by visiting the IP address associated with eth0 from another browser. You should get a simple HTML page with the text reading “It Works!”