A web server is a computer program that delivers (serves) content, such as web pages, using the Hypertext Transfer Protocol (HTTP), over the World Wide Web
There are many reasons that you might want a web server running on an i.MX applications processor. This tutorial will instruct you how to build the neccessary packages with LTIB and configure the device to host a website.
LAMP is an acronym for a solution stack of free, open source software, originally coined from the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, principal components to build a viable general purpose web server.
Adding the packages to LTIB is very easy and should build fine without any issues.
$ ./ltib -c
You simply to need to execute the binary "httpd". Typically, this is done when the system starts up, you can do this manually from the command line
$ /usr/sbin/httpd &
You can set up the system to do this automatically at start up in one of the rc files.I suggest starting httpd after most other services have started (i.e.: put it in rc.local).
Edit rc.local and add:
$ ifconfig eth0 Link encap:Ethernet HWaddr 00:22:19:06:b3:c1 inet addr:10.81.4.63 Bcast:10.81.7.255 Mask:255.255.252.0 inet6 addr: fe80::222:19ff:fe06:b3c1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10228404 errors:0 dropped:0 overruns:0 frame:0 TX packets:3843568 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3334983106 (3.3 GB) TX bytes:3344815017 (3.3 GB) Interrupt:17
You should see the Apache welcome page
|If you have any issues at this point, remove the proxy setting in your browser or add the i.MX ip address to your exceptions list|
You can find an enormous amount of documentation for configuring Apache webserver on the Apache website http://httpd.apache.org/docs/
Here we will start with the very basic setup. If you want to point Apache to serve files located in /home/public_html/ then...
$ cd /usr/conf
$ vi httpd.conf
- DocumentRoot "/usr/htdocs" to DocumentRoot "home/public_html"
- <Directory "/usr/htdocs"> to <Directory "home/public_html">
$ gedit dist/lfs-5.1/httpd/httpd.spec
$ cd /lib $ ln -s libssl.so.0.9.8 libssl.so
$ ./ltib -m prep -p httpd
$ ./ltib -m -prep -p openssl
/home/jeff/fsl/10_05/mx51/ltib/rpm/BUILD/openssl-0.9.8g/include/openssl $ cd /usr/include $ ln -s /home/jeff/fsl/10_05/mx51/ltib/rpm/BUILD/openssl-0.9.8g/include/openssl openssl
#ifdef OPENSSL_VERSION_NUMBER +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) #ifndef PEM_F_DEF_CALLBACK +#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK #endif #endif + /* * rsa sslc uses incomplete types for most structures * so we macroize for OpenSSL those which cannot be dereferenced
|This is supposedly fixed in later verstions 2.0.55.|
$ ./ltib -m scbuild -p openssl
$ ./ltib -m scdeploy -p openssl
$ ./ltib -m scbuild -p httpd
$ ./ltib -m scdeploy -p httpd
I have tried the same on imx28 but I am getting errors and httpd server is not restarting.
Issue is reported on community but no answer. Following is the link for the same.
Can you please help me what is going wrong with it?
Or is there other option ?