1 頁 (共 1 頁)

求救~如何在OS X裡面的apache啟動CGI讓他可以跑呢>_<

發表於 : 03/07/2004 10:15 pm
ulin
求救~如何在OS X裡面的apache啟動CGI讓他可以跑呢>_<

發表於 : 03/08/2004 3:07 am
bryanchang
你打開 /etc/httpd/httpd.conf 這個檔案,然後找到這段:

<Directory "/Library/WebServer/CGI-Executables">
...
...
...

</Directory>

再把中間的這行:

Options None

改成:

Options ExecCGI

存檔後,到 System Preferences > Sharing 去重新啟動 Web Sharing 即可。

還是不行啊>_<

發表於 : 03/08/2004 3:59 am
ulin
照你意思 做了一次
但我要存取cgi-bin/test.pl時卻顯示

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.

要存取cgi-bin/recipe時卻顯示
Forbidden
You don't have permission to access /cgi-bin/recipe/ on this server.

發表於 : 03/08/2004 6:41 am
bryanchang
這錯誤訊息這表示你確實已經啟動了 Apache CGI 的功能,可是你的 CGI 程式沒有正確的 Permission。請確認這些 Perl script 的 Permission.

另外 Apache 的 Error Log 是在 /var/log/http/error_log

我已經設了說...

發表於 : 03/08/2004 7:29 am
ulin
我有清楚設定每個程式的權限了....
比如cgi要設755
dat設666
等等
但是還是沒辦法執行.....
所以我弄了一個簡單的test.pl來執行
卻也不成......>_<......

Re: 我已經設了說...

發表於 : 08/03/2004 12:26 pm
hcchien
ulin 寫:我有清楚設定每個程式的權限了....
比如cgi要設755
dat設666
等等
但是還是沒辦法執行.....
所以我弄了一個簡單的test.pl來執行
卻也不成......>_<......
我猜你應該把 error log 貼上來比較能讓人知道情況
不過有了 Internal Server Error,至少 cgi 是跑起來了