I just install Ubuntu 13.10 and I am trying to install Apache. But when I tried to run a perl file in cgi-bin, the browser showed only plain text.
My default.conf of Apa
Expanding on the answer from @tops.
Try sudo a2enmod cgi
, if you have already tried following a bunch of tutorials like Apache Tutorial: Dynamic Content with CGI, Ubuntu HTTDP or How to Install Apache2 webserver with PHP, CGI, and Perl Support in Ubuntu Server, and still cannot figure out what is missing from them.
Then restart apache!
Which may be done with:
sudo /etc/init.d/apache2 restart
sudo apache2ctl restart
sudo service apache2 restart
<- try this first
This worked for me on Ubuntu 13.10.
New commands to users coming from RedHad based distributions:
a2enmod
a2dismod
a2enconf
a2disconf
a2ensite
a2dissite
Remember, the main configuration file is /etc/apache2/apache2.conf
by default, and individual configuration components for modules and websites are in separate files.
EDIT: Expanded with details as to why people coming to this page may be having difficulties with enabling Apache CGI on Ubuntu.