Computer Scientist

Tuesday, 15 May 2018

Apache HTTP Server on Ubuntu

The purpose of this document is to record all steps to install Apache http server and configure is as per various requirements. Nothing exciting happened during this process. This is highly related to the Ubuntu system and the specification of my own box. When it it referred by others to install and configure Apache in a Linux system, bear in mind the settings' difference.

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:


  1. 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.
  2. The only part needs to change is the Alias and Directory. 
    1. ScriptAlias /cgi-bin/ /var/www/<myhost_name>/public_html/cgi-bin/
    2. <Directory "/var/www/<myhost_name>/public_html/cgi-bin">
  3. Reload (or restart) the Apache server to feed the change of configuration into a running server.
  4. The URL to access the cgi file (helloworld.cgi) is: http://<myhost_name>/cgi-bin/helloworld.cgi

2 comments:

  1. Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also visit Now zoopup.

    ReplyDelete