詹姆士 寫:
/usr/local/apache/cgi-bin <=== 內定放置 cgi 的目錄
/usr/local/apache/htdocs <=== 內定放置首頁的目錄
這兩個目錄的權限,要設定成 755 或是 744 的權限才可以正常在瀏覽器上面瀏覽。
您有提到您對自己撰寫的 cgi 檔案修改了權限,不知道是不是連所在目錄都要呢~
謝謝您的回應與指導...
在httpd.conf裡的
ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"
檢查了/CGI-Executables/ 這個目錄如下..
:/Library/WebServer josh$ ls -laF
drwxrwxr-x 6 root admin 204 Oct 19 12:05 ./
drwxrwxr-t 50 root admin 1700 Oct 19 00:40 ../
-rw-rw-r-- 1 josh admin 6148 Oct 19 03:14 .DS_Store
drwxrwxr-x 6 root admin 204 Oct 19 11:23 CGI-Executables/
所以權限應該沒問題。
但http://127.0.0.1/cgi-bin/test.cgi
結果還是...
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.33 Server at joshdediannao.local Port 80