Install Apache in Ubuntu 16.04 LTS
The installation here put the Apache into my Ubuntu system with minimum requirements to make it run properly. No advanced features of the HTTP server will be discussed in this stage until the later section of this document.
Advanced features of an Apache server
CGI:
- Copy over the configure file of cgi (/etc/apache2/conf-available/serv-cgi-bin.conf) to the end of configure file of the Virtual Host (/etc/apache2/sites-available/<myhost_name>.conf), because I am using a Virtual Host in the Apache server.
- The only part needs to change is the Alias and Directory.
- ScriptAlias /cgi-bin/ /var/www/<myhost_name>/public_html/cgi-bin/
- <Directory "/var/www/<myhost_name>/public_html/cgi-bin">
- Reload (or restart) the Apache server to feed the change of configuration into a running server.
- The URL to access the cgi file (helloworld.cgi) is: http://<myhost_name>/cgi-bin/helloworld.cgi