Showing posts from March, 2014

CGI - Common Gateway Interface

What is the first thing come to your mind, when you see... CGI? Me -- Perl. But it's actually more than Perl. Here's some examples on CGI in different languages and some setups on Ubuntu to get the web server running. To setup Apache2 in Ubuntu. This will install and run the Apache2 server : sudo apt-get install apache2 By default, the cgi directory is setup at /usr/lib/cgi-bin . Just have your cgi scripts or executable put in this directory (make sure it's executable) and it can be access via http://localhost/cgi-bin/ path. This can be modified at the config file. The default config file is at /etc/apache2/sites-available/default . The section of the file that related to this looked like this : ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> The access and error log can be found at /var/log/a