我有一个用python编写的CGI脚本,我相信自己搞砸了配置。这是日志中的问题:
AHO1264: script not found or unable to stat: /var/www/html/cgi-binsubmit.py, referer: http://191.168.../index.html
不知何故,'/'已从cgi-bin和Submit.py之间删除。 提交表单:
<form action="/cgi-bin/submit.py" method="post" enctype="multipart/form-data">
<div class="form_settings">
<p>File: <input type="file" name="codefile"></p>
<p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="submit_button" value="submit" /></p>
</div>
</form>
'/'肯定在那里。我的apache2.conf文件:
<Directory /var/www>
Options FollowSymLinks
Allow from all
Require all granted
Alias "cgi-bin" "var/www/html/cgi-bin"
<Directory "/var/www/html/cgi-bin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AddHandler cgi-script .py
AddHandler cgi-script .cgi
AddHandler cgi-script .wsgi
</Directory>
我尝试在所有地方都使用'/',但始终找不到。 谢谢