- 論壇徽章:
- 0
|
根據(jù)error_log "attemp to invoke directory as script :/var/www/cgi-bin/"
查看了下源碼:
if (r->finfo.filetype == 0)
return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
"script not found or unable to stat");
if (r->finfo.filetype == APR_DIR)
return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
"attempt to invoke directory as script");
if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) &&
r->path_info && *r->path_info)
{
/* default to accept */
return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
"AcceptPathInfo off disallows user's path");
}
上面的代碼用于對請求的腳本的路徑信息進行檢查。需要請求的CGI腳本的信息保存在請求r->finfo中。如果r->finfo.filetype為零,則意味著沒有指定CGI腳本的路徑。如果指定的CGI腳本路徑是目錄名稱,則這也是不允許的。 |
|