Installing CGI BIN in Apache - Ubuntu -Common Gateway Interface
Let me introduce you to CG I at First ..
The Common Gateway Interface (CGI) is a standard method for web server software to delegate the generation of web content to executable files. Such files are known as CGI scripts; they are programs, often stand-alone applications, usually written in a scripting language. ---- by WikiPedia
Now..
1:-
There are mainly 3 modules
I CGI
II CGID
III userdir
Now type the following command in the terminal\
$ sudo a2enmod module
#NB: You should execute the command 3 times with each module names on "module" o the command above
2:-
Now Restart the Apache:
$ sudo /etc/init.d/apache2 restart
3:- Make public_html inside your home folder and place cbi-bin in it
$ cd ~
$ mkdir public_html
$ mkdir public_html/cgi-bin
4:- Now Edit Config...
$ cd /etc/apache2
5. Open Default file .
$ sudo gedit sites-available/default
Replace the line ScriptAlias with" ScriptAlias /cgi-bin/ /home/User_name/public_html/cgi-bin/"
Now edit tag
AllowOverride None
Options +ExecCGI -MultiViews +symLinksIfOwerMatch
SetHandler cgi-script
Order allow,deny
Allow from all
Add above content in the from line starting Options +ExecCGI
" SetHandler cgi-script "
$ sudo /etc/init.d/apache2 restart
Comments
Post a Comment