We are researching the http protocol and building our own http server. This guide build apache and test it out.

wget https://dlcdn.apache.org/httpd/httpd-2.4.56.tar.bz2
tar jxvf httpd-2.4.56.tar.bz2
cd httpd-2.4.56/

sudo apt-get install apache2-utils libapr1 libapr1-dev libaprutil1-dev -y
./configure --enable-cgi --prefix=/home/peter/Download/my-httpd
make -j
make install

Then you have this

Run the apache with CGI connects to PHP

  1. edit conf/httpd.conf , change “Listen 80” to “Listen 8765”
  2. run bin/httpd