J1UCF


# INSTALL emscripten

  $ cd ~
  # apt-get install git apache2
  $ git clone https://github.com/emscripten-core/emsdk
  $ cd emsdk/
  $ git pull
  # apt-get install build-essential python2.7 nodejs cmake default-jre
  # ln /usr/bin/python2.7 /usr/bin/python
  $ ./emsdk install latest
  $ ./emsdk activate latest
  $ source ./emsdk_env.sh
  $ emcc -v
  $ cd emscripten/1.38.25/
  $ emcc tests/hello_world.cpp (~2min)


# INSTALL pib (PHP in a browser)

  # cd ~
  # git clone https://github.com/oraoto/pib
  # cd pib/
  # bash build.sh (~5+5min)
  
  # pwd
  /root
  
  # cd ~
  # mv pib /var/www/html

Test it:

  <ip.addr>/pib/

phpinfo.php:

  <?php phpinfo.php ?>

EOF

# DIAGNOSTICS

The Apache Listen directive handles that

  http://httpd.apache.org/docs/2.2/bind.html

All interfaces:

  Listen 80

Specific IP only:

  Listen 192.0.2.1:80

By default apache will listen on all available interfaces

  # cat /etc/httpd/conf/httpd.conf | grep ^Listen
  Listen 80


# LINKS:

1. Install emscripten

  https://kripken.github.io/emscripten-site/docs/getting_started
    /downloads.html
  
2. Install pib

  https://github.com/oraoto/pib
  
3. How to configure Apache to run on multiple network interfaces?

  https://serverfault.com/questions/511018
    /how-to-configure-apache-to-run-on-multiple-network-interfaces
