Apache Python内部服务器错误500

2024-09-30 20:32:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我在RHEL7上有Apache2.4.6和Python2.7

我把我的html表单试用版1

<form action = "/cgi-bin/upload3.py" method = "post">
First Name: <input type = "text" name = "first_name"><br />
Last Name: <input type = "text" name = "last_name" />

<input type = "submit" value = "Submit" />
</form>

我的python脚本upload3.py为:

^{pr2}$

在将表单输入传递给python时,我遇到了内部服务器错误500,错误日志也没有得到更新。更早更新时显示:

[Mon Jun 04 19:50:23.883970 2018] [cgi:error] [pid 2921] [client 10.19.0.153:63063] AH01215: (2)No such file or directory: exec of '/var/www/cgi-bin/upload3.py' failed, referer: http://10.210.58.218/trial1.html
[Mon Jun 04 19:50:23.884649 2018] [cgi:error] [pid 2921] [client 10.19.0.153:63063] End of script output before headers: upload3.py, referer: http://10.210.58.218/trial1.html

Tags: textnamepyform表单inputbinhtml