<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Using i.MX as a webserver</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157737#M2633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="wiki-content"&gt;&lt;H4 id="toc-hId-1227757958"&gt;What is a webserver&lt;/H4&gt;&lt;P&gt;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&lt;/P&gt;&lt;H4 id="toc-hId--1324399003"&gt;Why use on i.MX?&lt;/H4&gt;&lt;P&gt;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.&lt;/P&gt;&lt;H4 id="toc-hId-418411332"&gt;Running a LAMP stack on i.MX&lt;/H4&gt;&lt;P&gt;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.&lt;/P&gt;&lt;H5 id="toc-hId-1964708162"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Adding the LAMP packages to LTIB&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;Adding the packages to LTIB is very easy and should build fine without any issues.&lt;BR /&gt;&lt;SPAN class="image-wrap"&gt;&lt;IMG src="http://wiki.freescale.net/download/thumbnails/28673353/building_apache_LTIB_cropped.png?width=200" width="200" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Simply reconfigure the BSP with LTIB to add the packages&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ ./ltib -c &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now add the following packages to the BSP&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;httpd (Apache webserver)&lt;/LI&gt;&lt;LI&gt;mysql&lt;/LI&gt;&lt;LI&gt;php, python, or perl&lt;/LI&gt;&lt;/UL&gt;&lt;H5 id="toc-hId--587448799"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Starting/Running the Web Server on your i.MX device&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;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&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ /usr/sbin/httpd &amp;amp;&lt;/PRE&gt;&lt;PRE class="code-java"&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Edit rc.local and add:&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;/usr/sbin/httpd &amp;amp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H5 id="toc-hId-1155361536"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Test your web server&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;OL&gt;&lt;LI&gt;Find the ip address on your i.MX device&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ 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 &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now open a browser and point to the ip address&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;http:&lt;SPAN class="code-comment"&gt;//10.81.4.63/ &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You should see the Apache welcome page&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="panelMacro"&gt;&lt;TABLE class="noteMacro"&gt;&lt;COLGROUP&gt;&lt;COL width="24" /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;IMG align="absmiddle" border="0" height="16" src="http://wiki.freescale.net/images/icons/emoticons/warning.gif" width="16" /&gt;&lt;/TD&gt;&lt;TD&gt;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&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;H5 id="toc-hId--1396795425"&gt;Configuring apache on i.MX&lt;/H5&gt;&lt;P&gt;You can find an enormous amount of documentation for configuring Apache webserver on the Apache website&amp;nbsp;&lt;A class="external-link" href="http://httpd.apache.org/docs/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://httpd.apache.org/docs/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://httpd.apache.org/docs/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://httpd.apache.org/docs/" rel="nofollow&lt;/A&gt;&lt;BR /&gt;Here we will start with the very basic setup.&amp;nbsp;If you want to point Apache to serve files located in /home/public_html/ then...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;On the i.MX target cd into the /user/conf directory&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ cd /usr/conf &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Edit httpd.conf&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ vi httpd.conf &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Change the following lines:&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;- DocumentRoot &lt;SPAN class="code-quote"&gt;"/usr/htdocs"&lt;/SPAN&gt; &lt;SPAN style="white-space: normal;"&gt;to &lt;/SPAN&gt;DocumentRoot &lt;SPAN class="code-quote"&gt;"home/public_html"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;and&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;- &amp;lt;Directory &lt;SPAN class="code-quote"&gt;"/usr/htdocs"&lt;/SPAN&gt;&amp;gt;  &lt;SPAN style="white-space: normal;"&gt;to &lt;/SPAN&gt;&amp;lt;Directory &lt;SPAN class="code-quote"&gt;"home/public_html"&lt;/SPAN&gt;&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H4 id="toc-hId-542528415"&gt;Adding a secure socket layer (SSL)&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;In ltib built kernel and fs with minimum configuration - no httpd and no openssl. So if the httpd package is selected then you must first remove it and then rebuild&lt;/LI&gt;&lt;LI&gt;Edited httpd spec file to add "--enable-ssl" to configure arguments&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ gedit dist/lfs-5.1/httpd/httpd.spec &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Add link in /lib to link libssl.so to libssl.so.0.9.8&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ cd /lib $ ln -s libssl.so.0.9.8 libssl.so&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Extract httpd from package pool&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m prep -p httpd &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Extract openssl from package pool&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m -prep -p openssl &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Link /usr/include/openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;/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&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now Patch httpd-2.0.54/modules/ssl/ssl_toolkit_compat.h with the the following patch&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;#ifdef OPENSSL_VERSION_NUMBER  +#&lt;SPAN class="code-keyword"&gt;if&lt;/SPAN&gt; (OPENSSL_VERSION_NUMBER &amp;gt;= 0x0090800fL) #ifndef PEM_F_DEF_CALLBACK +#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK #endif #endif + /*  * rsa sslc uses incomplete types &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; most structures  * so we macroize &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; OpenSSL those which cannot be dereferenced &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="panelMacro"&gt;&lt;TABLE class="noteMacro"&gt;&lt;COLGROUP&gt;&lt;COL width="24" /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;IMG align="absmiddle" border="0" height="16" src="http://wiki.freescale.net/images/icons/emoticons/warning.gif" width="16" /&gt;&lt;/TD&gt;&lt;TD&gt;This is supposedly fixed in later verstions 2.0.55.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Build openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scbuild -p openssl&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Deploy openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scdeploy -p openssl&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Build httpd&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scbuild -p httpd&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Deploy httpd&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scdeploy -p httpd&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;DIV class="pageSection" id="labels-section"&gt;&lt;DIV class="section-header" id="default-labels-header"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:02:34 GMT</pubDate>
    <dc:creator>J_Eastlack</dc:creator>
    <dc:date>2020-10-29T09:02:34Z</dc:date>
    <item>
      <title>Using i.MX as a webserver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157737#M2633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="wiki-content"&gt;&lt;H4 id="toc-hId-1227757958"&gt;What is a webserver&lt;/H4&gt;&lt;P&gt;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&lt;/P&gt;&lt;H4 id="toc-hId--1324399003"&gt;Why use on i.MX?&lt;/H4&gt;&lt;P&gt;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.&lt;/P&gt;&lt;H4 id="toc-hId-418411332"&gt;Running a LAMP stack on i.MX&lt;/H4&gt;&lt;P&gt;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.&lt;/P&gt;&lt;H5 id="toc-hId-1964708162"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Adding the LAMP packages to LTIB&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;Adding the packages to LTIB is very easy and should build fine without any issues.&lt;BR /&gt;&lt;SPAN class="image-wrap"&gt;&lt;IMG src="http://wiki.freescale.net/download/thumbnails/28673353/building_apache_LTIB_cropped.png?width=200" width="200" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Simply reconfigure the BSP with LTIB to add the packages&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ ./ltib -c &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now add the following packages to the BSP&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;httpd (Apache webserver)&lt;/LI&gt;&lt;LI&gt;mysql&lt;/LI&gt;&lt;LI&gt;php, python, or perl&lt;/LI&gt;&lt;/UL&gt;&lt;H5 id="toc-hId--587448799"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Starting/Running the Web Server on your i.MX device&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;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&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ /usr/sbin/httpd &amp;amp;&lt;/PRE&gt;&lt;PRE class="code-java"&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Edit rc.local and add:&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;/usr/sbin/httpd &amp;amp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H5 id="toc-hId-1155361536"&gt;&lt;STRONG&gt;&lt;SPAN class="font-size-2"&gt;Test your web server&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/H5&gt;&lt;OL&gt;&lt;LI&gt;Find the ip address on your i.MX device&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ 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 &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now open a browser and point to the ip address&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;http:&lt;SPAN class="code-comment"&gt;//10.81.4.63/ &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You should see the Apache welcome page&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="panelMacro"&gt;&lt;TABLE class="noteMacro"&gt;&lt;COLGROUP&gt;&lt;COL width="24" /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;IMG align="absmiddle" border="0" height="16" src="http://wiki.freescale.net/images/icons/emoticons/warning.gif" width="16" /&gt;&lt;/TD&gt;&lt;TD&gt;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&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;H5 id="toc-hId--1396795425"&gt;Configuring apache on i.MX&lt;/H5&gt;&lt;P&gt;You can find an enormous amount of documentation for configuring Apache webserver on the Apache website&amp;nbsp;&lt;A class="external-link" href="http://httpd.apache.org/docs/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://httpd.apache.org/docs/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://httpd.apache.org/docs/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://httpd.apache.org/docs/" rel="nofollow&lt;/A&gt;&lt;BR /&gt;Here we will start with the very basic setup.&amp;nbsp;If you want to point Apache to serve files located in /home/public_html/ then...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;On the i.MX target cd into the /user/conf directory&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ cd /usr/conf &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Edit httpd.conf&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ vi httpd.conf &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Change the following lines:&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;- DocumentRoot &lt;SPAN class="code-quote"&gt;"/usr/htdocs"&lt;/SPAN&gt; &lt;SPAN style="white-space: normal;"&gt;to &lt;/SPAN&gt;DocumentRoot &lt;SPAN class="code-quote"&gt;"home/public_html"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;and&lt;/P&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;- &amp;lt;Directory &lt;SPAN class="code-quote"&gt;"/usr/htdocs"&lt;/SPAN&gt;&amp;gt;  &lt;SPAN style="white-space: normal;"&gt;to &lt;/SPAN&gt;&amp;lt;Directory &lt;SPAN class="code-quote"&gt;"home/public_html"&lt;/SPAN&gt;&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H4 id="toc-hId-542528415"&gt;Adding a secure socket layer (SSL)&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;In ltib built kernel and fs with minimum configuration - no httpd and no openssl. So if the httpd package is selected then you must first remove it and then rebuild&lt;/LI&gt;&lt;LI&gt;Edited httpd spec file to add "--enable-ssl" to configure arguments&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ gedit dist/lfs-5.1/httpd/httpd.spec &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Add link in /lib to link libssl.so to libssl.so.0.9.8&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$ cd /lib $ ln -s libssl.so.0.9.8 libssl.so&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Extract httpd from package pool&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m prep -p httpd &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Extract openssl from package pool&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m -prep -p openssl &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Link /usr/include/openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;/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&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Now Patch httpd-2.0.54/modules/ssl/ssl_toolkit_compat.h with the the following patch&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;#ifdef OPENSSL_VERSION_NUMBER  +#&lt;SPAN class="code-keyword"&gt;if&lt;/SPAN&gt; (OPENSSL_VERSION_NUMBER &amp;gt;= 0x0090800fL) #ifndef PEM_F_DEF_CALLBACK +#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK #endif #endif + /*  * rsa sslc uses incomplete types &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; most structures  * so we macroize &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; OpenSSL those which cannot be dereferenced &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="panelMacro"&gt;&lt;TABLE class="noteMacro"&gt;&lt;COLGROUP&gt;&lt;COL width="24" /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;IMG align="absmiddle" border="0" height="16" src="http://wiki.freescale.net/images/icons/emoticons/warning.gif" width="16" /&gt;&lt;/TD&gt;&lt;TD&gt;This is supposedly fixed in later verstions 2.0.55.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Build openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scbuild -p openssl&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Deploy openssl&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scdeploy -p openssl&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Build httpd&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scbuild -p httpd&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Deploy httpd&lt;DIV class="panel code"&gt;&lt;DIV class="panelContent codeContent"&gt;&lt;PRE class="code-java"&gt;$  ./ltib -m scdeploy -p httpd&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;DIV class="pageSection" id="labels-section"&gt;&lt;DIV class="section-header" id="default-labels-header"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:02:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157737#M2633</guid>
      <dc:creator>J_Eastlack</dc:creator>
      <dc:date>2020-10-29T09:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using i.MX as a webserver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157738#M2634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the same on imx28 but I am getting errors and httpd server is not restarting.&lt;/P&gt;&lt;P&gt;Issue is reported on community but no answer. Following is the link for the same.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/392011"&gt;Issue with running httpd server on imx28&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Can you please help me what is going wrong with it?&lt;/P&gt;&lt;P&gt;Or is there other option ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhavesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 07:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157738#M2634</guid>
      <dc:creator>bkpatel</dc:creator>
      <dc:date>2016-05-17T07:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using i.MX as a webserver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157739#M2635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inside LAMP, Apache should be replaced by lighttpd, MySQL should be replaced by MariaDB. Right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 03:39:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-i-MX-as-a-webserver/m-p/157739#M2635</guid>
      <dc:creator>adamhuang</dc:creator>
      <dc:date>2016-11-22T03:39:44Z</dc:date>
    </item>
  </channel>
</rss>

