[英]Python cgi on apache server
I am new to python cgi programming. 我是python cgi编程的新手。 I have installed apache 2.2 server on linux mint and I have my html form in var/www folder which is being displayed properly.
我已经在linux mint上安装了apache 2.2服务器,我在var / www文件夹中的html表单正在正确显示。 Action to the form is a cgi script that I've put in the folder /usr/lib/cgi-bin.
对表单的操作是我放在文件夹/ usr / lib / cgi-bin中的cgi脚本。 But on submit, it says "The requested URL /usr/lib/cgi-bin/file.cgi as not found on this server."
但是在提交时,它说“请求的URL /usr/lib/cgi-bin/file.cgi在此服务器上找不到。” Does anyone know the fix for this?
有谁知道修复此问题?
/usr/lib/cgi-bin/file.cgi
? /usr/lib/cgi-bin/file.cgi
吗? #!/usr/bin/env python
or similar good? #!/usr/bin/env python
还是类似的好? Make sure that this file can be run from command line (ie. shebang is good) error.log
and access.log
(probably in /var/log/apache
) error.log
和access.log
(可能在/var/log/apache
) ExecCGI
for /usr/lib/cgi-bin/
directory in Apache configuration. /usr/lib/cgi-bin/
目录启用了ExecCGI
。 For examples see at: http://opensuse.swerdna.org/suseapache.html . ScriptAlias
directive. ScriptAlias
指令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.