By yogasuhas
Hi, I am basically from electronics background, but i have got interest in programing for web application, i am very new to it. Find very interesting and moreover i am enjoying it. I installed apache2 on ubuntu, i hosted some virtual host sites with index.html files. but i want to run c programme on browser. i went through cgi configuration for apache2, but was not successful. when i try for any /home/*/public_html/cgi-bin/ for DocumentRoot. apache2 gives DocumentRoot not found error, and get 403 and 404 error when try to access on browser. So how to run c executable file on browser using apache2 in ubuntu 14.04.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
To enable cgi-bin run:
sudo a2enmod cgi
sudo service apache2 restart
Then copy your executable to the directory /usr/lib/cgi-bin/ Assuming the name of your program is hello.cgi it will now be available at http://your.ip.address/cgi-bin/hello.cgi
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.