用cgi shell脚本重启apache实例

我试图从我的浏览器在服务器上重新启动我的apache实例。 为此,我正在使用cgishell脚本。 以下是我的代码片段。

echo '<FORM METHOD="GET" ACTION="">' echo '<select name=Website>' for file in $(find /etc/apache/* -maxdepth 0 -type d | cut -c1-23 --complement) do echo "<option value=$file>$file</option> " done echo '</select>' echo "<br><br>" echo '<INPUT TYPE="submit" VALUE="Stop">' echo '</FORM>' website_name=`echo "$QUERY_STRING" | sed "s|Website=||"` cd /etc/apache if [ -d "$site" ] then sudo /etc/init.d/apache stop $site else echo "" fi 

我在httpd.conf中为cgi目录添加了下面的规则

 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 

但是,我仍然无法从浏览器中停止Apache。cgi-bin文件夹和脚本文件具有完全的权限,并且apache服务在根目录下运行。 任何帮助将非常感激 !!