执行在Ubuntu一个文件名为.cgi [英] Execute a .cgi file in Ubuntu
本文介绍了执行在Ubuntu一个文件名为.cgi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我运行Ubuntu在Apache / PHP
I am running Apache/PHP under Ubuntu
当我运行的CGI文件,由 HTTP打算://localhost/mycgi.cgi
时,浏览器将显示code,而不是运行它的。
When I run the .cgi file, by going at http://localhost/mycgi.cgi
, the browser will display the code instead of running it.
我如何让浏览器执行CGI文件,而不是显示其内容的?
How do I make the browser execute the CGI file instead of showing its contents?
推荐答案
这些行添加到您的apache2.conf文件
Add these lines to your apache2.conf file
<Directory /usr/local/apache2/htdocs/somedir>
Options +ExecCGI
</Directory>
AddHandler cgi-script .cgi .pl
这篇关于执行在Ubuntu一个文件名为.cgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文